0

I'm hoping for a bit of help as i've been hitting my head against a brick wall all afternoon. We've just updated to version 6.7 of mobx and we are using react-tempusdominus-bootstrap 1.9 date picker component. Previously everything was working fine until the update of mobx, however i've noticed that if i pass any objects through to the date time picker, it will no longer fire the onChange event or even open the date time picker window.

So this works:

<DatePicker
onChange={stateFile.setDueDate}
format="D/MM/YYYY"
className="dateTimePicker"
iconClassName="icon-o icon-calendar text-dark"

/>

But this will not work

<DatePicker
onChange={stateFile.setDueDate}
format="D/MM/YYYY"
className="dateTimePicker"
iconClassName="icon-o icon-calendar text-dark"
icons={{
  time: 'icon-o icon-clock text-white',
  date: 'icon-o icon-calendar text-white',
  up: 'icon icon-arrow-up text-secondary',
  down: 'icon icon-arrow-down text-secondary',
  previous: 'icon icon-chevron-left text-secondary',
  next: 'icon icon-chevron-right text-secondary',
}}

/>

I've been reading through the mobx documentation but haven't managed to get anyway. I'm just wondering if anyone else has experienced anything similar and what the work around is?

Vince Ashby-Smith
  • 1,152
  • 4
  • 18
  • 36
  • Seems weird that it suddenly stops working after you pass a prop. Could you maybe make a repro on https://codesandbox.io/? – Danila Feb 22 '23 at 12:39

0 Answers0