Andres Aguilar
Posts: 0
Joined: Tue Apr 09, 2013 10:36 pm

Clicking Next Month on Limited Datepicker

Hi everyone!
I've added a datepicker to my project and I limited the range so the users can click only dates from one month after or one before. The problem is, if you click the next month button (or the month before button) to access a month that is after the last permitted day, it takes you back to the Home Page. In the datebox page, in the demos, the behaviour is doing nothing when you try the same. Any suggestions?

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Clicking Next Month on Limited Datepicker

Hi Andres,
Which browser and version, you're using? any errors in console?

Andres Aguilar
Posts: 0
Joined: Tue Apr 09, 2013 10:36 pm

Clicking Next Month on Limited Datepicker

I'm using Chrome (Updated), and it happens also on the devices. It doesn't show any error in the console, it just take you back to the first page.

Igor
Posts: 0
Joined: Tue Apr 02, 2013 12:05 pm

Clicking Next Month on Limited Datepicker

Can your share app with a href="mailto:support@tiggzi.com" rel="nofollow"support@tiggzi.com/a?

Andres Aguilar
Posts: 0
Joined: Tue Apr 09, 2013 10:36 pm

Clicking Next Month on Limited Datepicker

Shared. It's not the actual project, but just a simple example of what's happening.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Clicking Next Month on Limited Datepicker

Hi Andres,

Datepicker Component has properties Min date and Max date that are empty by default. But in your app they're filled with some dates.

Andres Aguilar
Posts: 0
Joined: Tue Apr 09, 2013 10:36 pm

Clicking Next Month on Limited Datepicker

Yes, I want to limit the calendar to those dates, but I don't want the datepicker to take me to my first page whenever I click Next and I'm out of range

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Clicking Next Month on Limited Datepicker

For example it's May, 9th. If you click arrow to navigate to June then Datepicker and Datepicker page are closed.

It may be caused by the following code:
codeevent.preventDefault();
event.stopPropagation();/code
In the end off address there is "#" symbol added, this causes navigation to start screen.

An arrow to navigate to the next month is code<a href="#">/code

Andres Aguilar
Posts: 0
Joined: Tue Apr 09, 2013 10:36 pm

Clicking Next Month on Limited Datepicker

Thanks, I see. Any solution to prevent that? Where did you find that code: codeevent&#46;preventDefault();
event&#46;stopPropagation();/code

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Clicking Next Month on Limited Datepicker

As a workaround you can hide navigation button when max date is reached. To do this on Load event add Run JavaScript action with the following code:

codeTiggzi('datepicker1')&#46;datepicker_dataPickerOptions&#46;hideIfNoPrevNext = true;
Tiggzi('datepicker1')&#46;initializeDataPicker();/code
Replace "datepicker1" with the component name.

Return to “Issues”