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

Allow the initialSelectedDate to be equal to startDate or endDate #5

Open
mikes222 opened this issue Dec 31, 2021 · 3 comments
Open

Comments

@mikes222
Copy link

Please allow the initialSelectedDate to be equal to startDate or endDate.

Usecase is to set the startDate AND the initialSelectedDate to now()

if (initialSelectedDate != null &&
    startDate != null &&
    !initialSelectedDate!.isAfter(startDate!)) {
  throw Exception('initialSelectedDate must be a date after startDate');
}

if (initialSelectedDate != null &&
    endDate != null &&
    !initialSelectedDate!.isBefore(endDate!)) {
  throw Exception('initialSelectedDate must be a date before endDate');
}
@hukjordanjanaq
Copy link
Contributor

#8 can you try?
Captura de Pantalla 2022-01-25 a la(s) 02 27 01

@mikes222
Copy link
Author

mikes222 commented Jan 25, 2022

It works for me. @pasaneramusugoda could you please accept the PR from @jordanjanaq ?

@mikes222
Copy link
Author

Since there was no reaction from the orignal author I decided to refactor the library and add the missing features by myself.

@pasaneramusugoda If you like to feel free to take over the code from https://github.com/mikes222/date_time_picker_widget and deploy a new version to pub.dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants