Altinn / altinn-design-system

Design system v2
https://designsystem.altinn.studio/
BSD 3-Clause "New" or "Revised" License
8 stars 7 forks source link

Component: Date picker (getting rid of material-ui) #210

Open bjosttveit opened 1 year ago

bjosttveit commented 1 year ago

Description

App-frontend-react currently uses the DatePicker from material-ui/pickers, this package is no longer maintained and should be replaced. The best option in my opinion is not upgrading to a newer version of material-ui, but rather getting rid of material-ui entirely and having all such components in the design system.

Additional Information

NAV has started building their own Datepicker in their design system, this could be a source of inspiration:

Having the ability to select time is also an interesting concept, as it is likely a fairly common need. This could either be a part of the same component or a separate component.

TomasEng commented 8 months ago

Modern browsers have built-in date/time pickers that can be accessed by <input type="date"/> or <input type="time"/>. We will probably use that when implementing a date picker in our design system. Meanwhile, you can apply the type attribute to TextField.