aboveyunhai / chakra-dayzed-datepicker

Chakra UI + Dayzed = datepicker
https://aboveyunhai.github.io/chakra-dayzed-datepicker/
MIT License
223 stars 46 forks source link

change day name keys #14

Closed david-morris closed 2 years ago

david-morris commented 2 years ago

Please review this PR carefully. I was able to build this and verify that this fixed the bugs relating to duplicate day text, but it didn't build correctly, and I haven't tested it with chakra themes working. fixes #13

aboveyunhai commented 2 years ago

Based on the warning message, It doesn't look like a bug from this repo at least. The reason you got duplicate is because you modify the name as sun -> s, sat -> s.

Regardless it cause error or not, this will cause user confusion to have two identical week days in terms of UI/UX. I would rather leave it as it is for now, to give the developer a warning, unless you can give a practical reason why you would like to have same label for different days.

david-morris commented 2 years ago

The days are already displayed spatially, and in the two cultures I have experience with (US and German), we expect a calendar to be laid out Monday...Sunday or Sunday...Saturday.

Our UI expert mocked up a UI which used single-letter abbreviations for the days of the week for compactness.

In fact, my Samsung Galaxy Watch 4 calendar tile uses the less common Monday...Sunday variant with single-letter abbreviations MTWTFSS for compactness, and I have not found it confusing. I believe this is because Tuesday and Thursday are easily disambiguated by which side of Wednesday they're on, and using calendars of those two types has trained me to see weekends unambiguously.

aboveyunhai commented 2 years ago

The days are already displayed spatially, and in the two cultures I have experience with (US and German), we expect a calendar to be laid out Monday...Sunday or Sunday...Saturday.

Our UI expert mocked up a UI which used single-letter abbreviations for the days of the week for compactness.

In fact, my Samsung Galaxy Watch 4 calendar tile uses the less common Monday...Sunday variant with single-letter abbreviations MTWTFSS for compactness, and I have not found it confusing. I believe this is because Tuesday and Thursday are easily disambiguated by which side of Wednesday they're on, and using calendars of those two types has trained me to see weekends unambiguously.

Quite interesting and educational, let me update the pr later to make the key unique and intuitive.