cancel
Showing results for 
Search instead for 
Did you mean: 
tony_jose
Nintex Newbie

Year Range issue with Date Picker Control on Nintex Form

Jump to solution

Hi,

We have in issue with Date Picker control on Nintex Form.  The year range is displayed on the form is for the last 10 years only. If we select a year it then goes back to another 10 years.  How can I change the year range to display last 100 years by default?

Out Nintex form version is 2.3.3.1 and we run it on SharePoint 2013.

Thanks

Tony

Reply
7 Replies
Highlighted
Automation Master
Automation Master

Re: Year Range issue with Date Picker Control on Nintex Form

Jump to solution

you can configure it, but only with a javascript

NWF.FormFiller.Events.RegisterAfterReady(function(){
   NWF$('#' + dateCtrl).datepicker('option',{
       yearRange: "-50:+50",
   })
})
Reply
tony_jose
Nintex Newbie

Re: Year Range issue with Date Picker Control on Nintex Form

Jump to solution

Thanks so much.  It worked for me.

Reply
Automation Master
Automation Master

Re: Year Range issue with Date Picker Control on Nintex Form

Jump to solution

Great!

Please mark the question answered.

Reply
chaddavis
Nintex Newbie

Re: Year Range issue with Date Picker Control on Nintex Form

Jump to solution

This is exactly what I needed!

In my case, I have a large form with a number of Date Picker controls. So, I actually made a slight change to the code to make it work for all Date Picker controls across the form, and not require any setting changes to the individual controls.

I've replaced this:

NWF$('#' + dateCtrl)

with this:

NWF$('.nf-date-picker')

Thank you once again Marian Hatala‌!

Reply
mikeboggs23
Nintex Newbie

Re: Year Range issue with Date Picker Control on Nintex Form

Jump to solution

Ok, so how about those of us using responsive forms? I need a date of birth field, and going back only 10 years is a huge problem. 

0 Kudos
Reply
Automation Master
Automation Master

Re: Year Range issue with Date Picker Control on Nintex Form

Jump to solution

unfortunatelly, with responsive forms you're out of luck...

0 Kudos
Reply
jambou
Nintex Newbie

Re: Year Range issue with Date Picker Control on Nintex Form

Jump to solution
Newbie question...do I just copy and paste the above code into Settings > Custom JavaScript ? I've tried and nothing happens.
0 Kudos
Reply