Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: DateInput #2824

Closed
archiewood opened this issue Nov 20, 2024 · 2 comments
Closed

[Feature]: DateInput #2824

archiewood opened this issue Nov 20, 2024 · 2 comments
Assignees
Labels
ui/components Components that are not data viz

Comments

@archiewood
Copy link
Member

archiewood commented Nov 20, 2024

Like DateRange but just for one date.

<DateInput 
  data={my_query} 
  dates=order_date 
  name=selected_date
/>

I think there is a possible rationale to allow

<DateInput 
  data={my_query} 
  dates=order_date 
  name=selected_date
  range=true
/>

that is just an alias for the DateRange component

@archiewood archiewood added the ui/components Components that are not data viz label Nov 20, 2024
@kwongz kwongz self-assigned this Nov 21, 2024
@zachstence
Copy link
Member

While I do like having one DateInput component with the range prop, lets just add the single DateInput component for now and we can refactor/merge them later on

@kwongz
Copy link
Contributor

kwongz commented Nov 21, 2024

Currently, DateRange relies on the Bits UI Range Calendar. This implementation could be refactored to handle single dates, enabling functionality similar to the Bits UI Date Picker, which is designed for single-date selection.

To achieve this, we could create a new DateInput component derived from DateRange. The initial state would handle single dates, with a prop allowing it to switch back to the full DateRange functionality, all within the DateInput interface.

For backward compatibility, the existing DateRange component would remain unchanged for current users, while any new features and improvements would be incorporated into DateInput.

Image
Image.

@kwongz kwongz mentioned this issue Nov 29, 2024
4 tasks
@hughess hughess closed this as completed Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui/components Components that are not data viz
Projects
None yet
Development

No branches or pull requests

4 participants