Hello, community!
I have datePicker with selectionMode=range, and I want to set maxdate as: first date in range + month - 1 day.
For example if I select 1 Jan, maxdate should be 31 Jan.
Is it possible?
PF 8.0
DatePicker: set maxdate based on first date in range
-
- Posts: 1
- Joined: 22 Sep 2021, 14:01
$("#datepicker").datepicker({ minDate: -0, maxDate: new Date(2013, 1, 18) });
You can try the above code, it helped me. I think it can solve your issue too. If you want to use hard coded date, use the new Date(2013, 1, 18) pattern.
If you want to use a generic pattern, use "+1D +1M +1Y".
You can try the above code, it helped me. I think it can solve your issue too. If you want to use hard coded date, use the new Date(2013, 1, 18) pattern.
If you want to use a generic pattern, use "+1D +1M +1Y".
-
- Information
-
Who is online
Users browsing this forum: No registered users and 34 guests