Page 1 of 2
datepicker year navigation
Posted: Thu Aug 14, 2014 5:59 pm
by eyesmoker
currently, date picker component left and right arrow changes on monthly basis. Is there a way to add additional left and right arrows that will change year (from Sep 2014, clicking on that additional left arrow should go to Sep 2013)?
datepicker year navigation
Posted: Thu Aug 14, 2014 7:45 pm
by Kateryna Grynko
Hi,
Please run the following code for a datepicker named mobiledatepickerName to switch years:preApperyio("mobiledatepickerName").datapickerRoot.datepicker({"changeYear": true});/pre
datepicker year navigation
Posted: Thu Aug 14, 2014 8:22 pm
by eyesmoker
Sorry. Can you tell me where to add this code?
When I added on page load (where I have the datepicker), it is adding a new date picker with the year. If I do like this, I need to complete implement onclick etc etc all over again.
datepicker year navigation
Posted: Fri Aug 15, 2014 7:35 am
by Evgene Karachevtsev
Hello,
You should call this code on the event load. This code will add the possibility of choice of a year in the existing datepicker.
datepicker year navigation
Posted: Sat Jan 03, 2015 3:00 am
by realmadrid2121 .
I am having same issue ....I don't see where you can add on event load ? I can only see page load and page show . Please help
datepicker year navigation
Posted: Sun Jan 04, 2015 11:57 pm
by Yurii Orishchuk
Hello,
You can use this code in "page show" event handler.
Regards.
datepicker year navigation
Posted: Tue Jan 06, 2015 7:02 pm
by realmadrid2121 .
Hello Yurii,
I tried the above code using page show with my calender selector instead of
"mobiledatepickerName" and what happens is that i get the existing calendar and a second calendar which has the year scroller in it underneath . This is not correct
datepicker year navigation
Posted: Wed Jan 07, 2015 2:04 am
by Yurii Orishchuk
Hello,
Please use following JS code:
pre
//Where "mobiledatepicker_73" is your datepicker component name.
Apperyio("mobiledatepicker_73").datepicker_dataPickerOptions.changeYear = true;
Apperyio("mobiledatepicker_73").initializeDataPicker()
/pre
Regards.
datepicker year navigation
Posted: Wed Jan 07, 2015 2:48 am
by realmadrid2121 .
Yurii,
Thank you so much, this worked as you described. However when I select a year from the drop down menu the calender looses the style size color swatch etc that the original calendar has . Is there a way to keep the orignal calender style ?
Thanks again
datepicker year navigation
Posted: Wed Jan 07, 2015 5:58 am
by Yurii Orishchuk
Hello,
Please show us before and after this issue screenshots.
Regards.