-
-
Notifications
You must be signed in to change notification settings - Fork 206
-
Currently, the DatePicker implements a Window that can't be controlled at all (besides exposing a ref, style and shadow).
Ideally, the component should be refactored and split into:
- A calendar: a generic implementation that takes props such as
month: number,year: number,selectedDate: string,selectedDateStart: string,selectedDateEnd: string. The name could beCalendarView. - An input that displays the calendar: following the
Selectcomponent and the<input type=date>HTML element, a dropdown that shows a masked text input and a button that opens the calendar.
Because Date contains time information, manipulating it can cause the date to shift because of daylight savings times around the world, therefore I suggest falling back to what input=date uses, a date string that is then parsed according to the date strings format.
Optionally:
- A date picker window: using the
CalendarViewabove, theDatePickercould be renamed toDateDialog, and some additional properties should be added to allow icon, title and close button configuration.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment