Hi guys I am facing a problem, when I try to set a dynamic maxDate with a MobX computed value.
I have one picker which onChange event sets a another variable in the store that should be the new maxDate of another picker (it can be a future date)
// this is the store variable, that initially it's equals to now (formatted string)
Store.startDate = '2019-09-30T09:18:28'
When the first picker changes sets the Store.startDate with his value.
// flatpikr 1
<Flatpickr
options={{
onChange: (selectedDates, dateStr) => {
// this is MobX action to change the observable value the result will be Store.startDate = dateStr;
Store.setStartDate(dateStr);
}
}}
/>;
Hi guys I am facing a problem, when I try to set a dynamic maxDate with a MobX computed value. I have one picker which onChange event sets a another variable in the store that should be the new maxDate of another picker (it can be a future date)
When the first picker changes sets the Store.startDate with his value.
When I change the first time the variable from the first picker, the months Dropdown is broken and shows only one month, the current month.
If is set a static string like this
2019-09-30T09:18:28
, the months Dropdown works fine.Thank you !