eyesmoker
Posts: 0
Joined: Fri Jul 04, 2014 3:45 am

datepicker year navigation

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)?

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

datepicker year navigation

Hi,

Please run the following code for a datepicker named mobiledatepickerName to switch years:preApperyio("mobiledatepickerName").datapickerRoot.datepicker({"changeYear": true});/pre

eyesmoker
Posts: 0
Joined: Fri Jul 04, 2014 3:45 am

datepicker year navigation

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.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

datepicker year navigation

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.

realmadrid2121 .
Posts: 0
Joined: Mon Sep 22, 2014 1:08 am

datepicker year navigation

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

datepicker year navigation

Hello,

You can use this code in "page show" event handler.

Regards.

realmadrid2121 .
Posts: 0
Joined: Mon Sep 22, 2014 1:08 am

datepicker year navigation

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

datepicker year navigation

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.

realmadrid2121 .
Posts: 0
Joined: Mon Sep 22, 2014 1:08 am

datepicker year navigation

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

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

datepicker year navigation

Hello,

Please show us before and after this issue screenshots.

Regards.

Return to “Issues”