Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: DateTimePicker reset

RsrgChData premium asked 1 year ago


Expected behavior

1) On first load a page with information is loaded and the DateTimePicker starts with the current date and time

2) The user selects a new date and time from the DateTimePicker

3) The input has changed to what the user has selected

4) From the SideNav the user navigates to a different item that loads the same page but with info specific to that item

5) The DateTimePicker should show the current date and time

Actual behavior

5) The DateTimePicker shows the date and time chosen for the previous item.

Resources (screenshots, code snippets etc.)

In addition the Clear btn does not revert the input to the current date and time but makrs the input as invalid (red border and exclamation sign)


Mateusz Lazaru staff answered 1 year ago


I assume you have multiple DateTimePicker components in your app (one for every item)?

Clear button indeed doesn't work as expected, that is already on our todo list and the fix is upcoming.


RsrgChData premium commented 1 year ago

On the page I have two DateTimePickers - one for date/time From and one for date/time To. In the SideNav I have all items listed and when the user clicks on them, a specific page with information regarding that item is opened. That page is one and the same for all items (right from the SideNav). The information fetched is based on the two DateTimePickers. When the user selects an item for the SideNav the all DateTimePickers should be reset to the initial value (new Date()), just like all dropdowns, all charts, all everything is reset to the default state I have provided. And everything does reset to it's initial state. Just the DateTimePickers do not


Mateusz Lazaru staff commented 1 year ago

We're going to fix the value prop to allow creating a controlled DateTimePicker. It should solve your problem.


RsrgChData premium commented 1 year ago

Do you have an estimated timeframe for when the fix might be implemented? Is there any chance it will be added to the 6.5 release?


Mateusz Lazaru staff commented 1 year ago

This is a priority task and I hope we will manage to include it in the upcoming release.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Premium
  • Premium support: Yes
  • Technology: MDB React
  • MDB Version: MDB5 5.0.0
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: No
  • Provided link: No