maxkeppeler / sheets-compose-dialogs

✨ Enhancing Android UIs: A Jetpack Compose Library supporting a wide range of common use-cases with Material Design 3 Dialogs, Popups, and Bottom Sheets. ✨
https://maxkeppeler.github.io/sheets-compose-dialogs/
Apache License 2.0
807 stars 38 forks source link

[Feature] Allow setting minimum and maximum date/times for DateTimeDialog #63

Open Nek-12 opened 1 year ago

Nek-12 commented 1 year ago

Right now the datetime dialog supports only min year and max year, however a common use case is for example select a date in the future only or set boundaries on available values. Proposed solution is to add minimum datetime and maximum datetime to date selection and datetime selection dialogs.

yu502950715yang commented 1 year ago

Right now the datetime dialog supports only min year and max year, however a common use case is for example select a date in the future only or set boundaries on available values. Proposed solution is to add minimum datetime and maximum datetime to date selection and datetime selection dialogs.

you can use like this CalendarConfig( yearSelection = true, monthSelection = true, style = CalendarStyle.MONTH, boundary = LocalDate.of(2023, 5, 12)..uiState.currentDate ), boundary is the range of dates that are displayed.

Nek-12 commented 1 year ago

I'm not talking about the calendar dialog, @yu502950715yang

maxkeppeler commented 1 year ago

I knew this would be a request sooner or later. 😆 I will work on it, but currently I have no free time left. I would like to see it as well.