tremor icon indicating copy to clipboard operation
tremor copied to clipboard

Date picker - single date

Open bart-sofomo opened this issue 1 year ago • 6 comments

Hi, I was able to make a workaround so when I click a date in DateRangePicker it's always giving me just a single day but is there any option to close calendar modal on click?

bart-sofomo avatar Apr 17 '23 14:04 bart-sofomo

@bart-sofomo currently you can only select a single day by clicking two times on the same date.

mitrotasios avatar Apr 18 '23 19:04 mitrotasios

Would love to have DatePicker instead of clicking two times on DateRangePicker

K4CZP3R avatar Apr 22 '23 10:04 K4CZP3R

@K4CZP3R, that's something we are actually considering to add. Would you mind elaborating what your use-case would be in the dashboard context?

mitrotasios avatar Apr 22 '23 12:04 mitrotasios

I have several situations that I could put a single date picker to use immediately: User date of birth (important for my app), user access end date (for admins to schedule user termination), scheduling a future event, adding a historical event to user profile.

I am validating plain text at the moment for this, and TextInput does not expose type="date"

(PS: I know that Tremor is designed for dashboards but it has almost all the features I need in my app so otherwise very happy to have one framework which is opinionated in design and includes chart and other UI)

thomasmcinnis avatar Apr 27 '23 23:04 thomasmcinnis

got it, thanks for elaborating! We'll include a Datepicker probably soon

mitrotasios avatar Apr 28 '23 10:04 mitrotasios

Seconded! would love this!

Use case is employee is entering weight into a form that is measured daily and can only be enter once for a day. using this for now tho.

onValueChange={(e)=>{ setDateRange([e[0],e[0]]) }}

Michael-fore avatar May 11 '23 21:05 Michael-fore

:tada: This issue has been resolved in version 3.4.0-beta-3.4.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

github-actions[bot] avatar Jul 01 '23 23:07 github-actions[bot]