Open MarinePicaut opened 3 years ago
You can use any date library you want as long as it implements the required interface of LocalizationProvider#dateAdapter
.
So you can already use the Temporal API. This is for now the better approach since we don't want to maintain an implementation relying on experimental APIs. Once it becomes stable we can include the implementation in the lab.
This proposal is now in the hands of ECMAScript engine implementers, so the bar for making API changes is extremely high - https://github.com/tc39/proposal-temporal/tree/main/#polyfill
I'm also interested in using the Temporal API polyfill. Has anyone tried implementing the dateAdapter interface?
I've been hacking away at an interface implementation for MuiPickersAdapter
Unfortunately, I've run out of time on this one, if anyone fancies picking up my hack where I'm leaving it: https://gist.github.com/remy90/46920c3496def037992ffd1d1d70eaa2#file-temporaldateadapter-txt
It would be great to add the Temporal API as a part of date-librairies to the Date / Time pickers component
Summary 💡
It should work same as the others date-librairies supported by the component.
Examples 🌈
Same as here
Motivation 🔦
[Temporal](https://github.com/tc39/proposal-temporal is the future, currently stage 3