flowbite icon indicating copy to clipboard operation
flowbite copied to clipboard

Feature: Date range picker: Max/min date

Open leoplct opened this issue 2 years ago • 8 comments

Is your feature request related to a problem? Please describe. The user is able to selected only a date within a specific range. Other days are disabled. For example, it must now allowed to selected a date in the future or earlier a certain date.

Example: https://www.daterangepicker.com/#options

  • minDate: (Date or string) The earliest date a user may select.
  • maxDate: (Date or string) The latest date a user may select.

Describe the solution you'd like It must be specified at HTML level so it's customizable for user-specific range (server-rendered page, JS bundling).

<div date-rangepicker>
  <input datepicker-maxdate="2023-12-31" datepicker-mindate="2023-01-01" name="start" type="text" class="" placeholder="Select date start">
</div>

leoplct avatar Jan 17 '23 23:01 leoplct

Hey @leoplct,

I've been planning on making some updates and adding new features/options to the datepicker component - so your request is reasonable and I'll add it as soon as I get to it.

Cheers, Zoltan

zoltanszogyenyi avatar Jan 19 '23 16:01 zoltanszogyenyi

Hi, is this issue still open? I want to work on this issue; please assign me to this.

aarushisoni avatar Jan 21 '23 05:01 aarushisoni

@zoltanszogyenyi - can we assign to @aarushisoni - or is someone able to do this? I would love to have this feature. I've integrated using Laravel Jetstream but would prefer to stick with data tags.

tanami20 avatar Feb 04 '24 11:02 tanami20

+1 on this

bk-one avatar Mar 22 '24 14:03 bk-one

Would be super helpful!

eliasbraun avatar Mar 22 '24 14:03 eliasbraun

Hi guys, is it already added to the component ? It would me super helpful :)

AnatoleT avatar Apr 15 '24 07:04 AnatoleT

Can we get this via the data tags? its essential for a date-time picker.

tanami20 avatar Apr 29 '24 11:04 tanami20

Does anyone recommend something else if this function doesn't exist? it is very common to want to have this.

tanami20 avatar May 07 '24 10:05 tanami20

Hey everyone,

The max and min date settings are now available via the new Flowbite Datepicker API:

https://flowbite.com/docs/components/datepicker/#max-and-min-dates

Cheers, Zoltan

zoltanszogyenyi avatar Jun 27 '24 10:06 zoltanszogyenyi