Page 1 of 1

Disable Future or Previous Dates from Date Picker

Posted: Fri Jun 23, 2017 4:37 am
by 256789023750

I warmly greet you all.
I am currently working on a booking application and as part of enhancing validation for date i would wish to limit the user from picking a date older than today.
I also wish to have a similar case but for picking the date of birth where by someone should not be able to pick future dates.
If anyone knows how i can achieve those two validation techniques using a date picker in phpmaker 12 or 2017, please come to my rescue.
Thank you so much


Re: Disable Future or Previous Dates from Date Picker

Posted: Fri Jun 23, 2017 11:24 am
by arbei

You can control the available years by setup the range in settings of JSCalendar in Client Scripts.

For example:
$(document).on("calendar", function(e, args) {
args.settings.range = [2017,2018]; // only 2017 and 2018 avaliable
});