govtechmy / myds

A design system for Malaysian government
https://design.digital.gov.my
20 stars 2 forks source link

Feat/datefield #57

Closed danielzairin closed 2 weeks ago

danielzairin commented 3 weeks ago

RadixUI doesn't have a primitive Date component so I used react-aria-components' DateField. If this is an issue I can look at other solutions.

react-aria uses the @internationalized/date package for date values. Since our DatePicker component uses native Date objects, I've adapted the props for consistency. To keep things simple, I've also remove validation props like "minValue", "maxValue" since these expect date instances from the @internationalized/date package too.

https://github.com/user-attachments/assets/0520a897-ad01-44cf-b179-529eae558f1d

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
kd-standard ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 2:53am
myds ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 2:53am
myds-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 12, 2024 2:53am
danielzairin commented 2 weeks ago

Update: Used html date input as discussed with @irfancoder.

Got a few issues that I think are minor: