date-time-picker icon indicating copy to clipboard operation
date-time-picker copied to clipboard

Increased date time adapter compatibility

Open Venators opened this issue 11 months ago • 1 comments

Thanks to the date-time picker's date implementation agnostic nature, it's easy for developers to work with their preferred date implementations. Out of the gate, they are treated to four pre-made modules: Native, Unix Timestamp, DayJs, and Moment.

However, all four of those date implementations use 0-indexed day of the week and month arrays, and subsequently, the date-time picker has hard-coded variables and 0-based logic that makes the library partially incompatible with date implementations that use different indexing, like Luxon, regardless of the custom date-time adapter in use.

The minor changes in this PR retain the current behaviour and compatibility with the current 0-indexed date implementations whilst also increasing the library's compatibility with 1-indexed date implementations.

Venators avatar Mar 15 '24 04:03 Venators

thank you @Venators , left a comment

danielmoncada avatar Jun 28 '24 04:06 danielmoncada