Closed badie21 closed 2 years ago
i used day.js to get the object of date and then set that as initial value
date: dayjs(
Jmoment.from(selectedField.contract.datetime, 'YYYY-MM-DD')
.locale('fa')
.format('YYYY-MM-DD'),
).locale('fa')
Hi Saeed
Are you sure that default value will work with dayjs object? I try it in different ways, but I didn't get any hopeful results.
When you set default value with dayjs object, it will throw:
TypeError: clone.weekday is not a function
Because clone().weekday()
is a function of moment, not dayjs.
I think you did wrong.
Currently, the only way of setting default value is moment. But when the value set by moment
, it goes crasy because you mixed up moment
and dayjs
.
Can you set a default value in your demo page?
when i'm trying to set initial value for jalali datepicker via form.setFieldsValue the datepicker popup container goes crazy and i can't figure the problem and you can not select a date until you choose the today date and then it is possible to choose date
this is the part of my code that i'm trying to set datePicker initial value