Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DatePicker improvements #343

WesSouza started this conversation in Ideas
Discussion options

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 be CalendarView.
  • An input that displays the calendar: following the Select component 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 CalendarView above, the DatePicker could be renamed to DateDialog, and some additional properties should be added to allow icon, title and close button configuration.
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /