This topic is locked
[SOLVED]

 Setting 'From' Year

10/23/2017 11:35:37 AM
PHPRunner General questions
G
GregJ author

Anyone know of a way to set the lowest From year to be current year + 1 or 2018 in this case?

Sergey Kornilov admin 10/23/2017

We do not have such an option.

G
GregJ author 10/24/2017

Thanks Sergey, that would have been the easy way out. I do have a plan B with a little JS to check the year and warn if it's wrong. I'll post it here when I get it working.

Sergey Kornilov admin 10/24/2017

You can enter 0 there and implement Javascript code that will remove the first option from that dropdown.

G
GregJ author 10/25/2017



You can enter 0 there and implement Javascript code that will remove the first option from that dropdown.


Even better idea! Here's what I ended up with, works perfectly:

// allow only year selection of next year for expiry date

var today = new Date();

var yyyy = today.getFullYear();

$("#yearvalue_ExpiryDate_8 option[value='"+yyyy+"']").remove();