Can't get Min Date on datepicker to work dynamycally

I inserted a datepicker field in a modal and it works as intended.

When i set dynamic attribute Min Date = Datetime element. The calendar pops up and vanishes instantly. I have enough time to see that it does cross out past date but no chance to select a date it vanishes too fast.

I ensured that moment.js is before datepicker.

Tested on chrome and edge

/J

Try formatting datetime element’s value to yyyy/MM/dd.
Also, do you see any errors on console?

1 Like

Thanks. doing that DOES work. however browser throws this error:

deprecation warning: value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.

using: datetimevar.datetime.formatDate(‘yyyy/MM/dd’)

You should not format the date like that.
The only reason the popup would close automatically is because the date and time component is set to refresh every second. Change that to Days, and it will work fine.
Screenshot 2021-01-28 at 14.11.17

If you insist on using date and time component refreshing every second, then the date should be in ISO format yyyy-MM-dd