I got the following error form.min.js:1 Error: Invalid date provided: Invalid Date at Object.parseDate (form.min.js:1)
And I am using the flatpickr to pick the date in the input field.
If anyone has the solution please share it with me.
Thanks in Advance.
I guess you're supplying defaultDate to the calendar, like initial value? If you're getting a problem there, check if you're passing the value in the right format: https://flatpickr.js.org/examples/ for example:
Date Object
new Date(2015, 0, 10)
Timestamp
1488136398547
ISO Date Strings
"2017-02-26T19:40:03.243Z"
Console log the value you're passing to the component to check the actual format.
For Example,
var testDate;
var expDate = 04/08/2022;
testDate = new Date(expDate.substr(6, 4), expDate.substr(3, 2) - 1, expDate.substr(0, 2))
It works for me!