Page 1 of 1

Dynamic minDate

Posted: Tue Jul 07, 2020 11:10 am
by GianYagami
Hi,
I need to reset minDate attribute. if a dropdown changes, it will affected the minDate. I've tried to get element and then set attribute "min" but it does not work. Using case variables (@@) which mean fixed minDate.

Re: Dynamic minDate

Posted: Sat Jul 11, 2020 12:19 am
by GianYagami
I found my own problems, modify datepicker (actually datetimepicker in processmaker 3) attributes is impossible to do.
Look at my snippet code:
Code: Select all
$("#expectDate").datetimepicker({ minDate: "2020-07-13"}); // this is actually valid, but conflict with processmaker designer setup
$("#expectDate").getControl().datetimepicker({ minDate: "2020-07-13")}); //same as above, it's modified datetimepicker attribute
running this code cause field filled with incorrect format, it's can be fixed with reset/repick on date/calendar selection,
this code only works at first time. Whenever field is changed, it does not work anymore. 😔😔😔

Re: Dynamic minDate

Posted: Sat Jul 11, 2020 3:02 pm
by Ironguts25
Have you seen this on the PMUsers Wiki page:

https://www.pmusers.com/index.php/Set_the_minimum_and_maximum_dates_in_a_datetime_field

Might be helpful for your situation.

Thx.

Re: Dynamic minDate

Posted: Sat Jul 11, 2020 3:07 pm
by GianYagami
Ironguts25 wrote: Sat Jul 11, 2020 3:02 pm Have you seen this on the PMUsers Wiki page:

https://www.pmusers.com/index.php/Set_the_minimum_and_maximum_dates_in_a_datetime_field

Might be helpful for your situation.

Thx.
Thx for the reply but I don't see there's do something with minDate except read the value