mmazzarolo / react-native-modal-datetime-picker

A React-Native datetime-picker for Android and iOS
MIT License
2.94k stars 392 forks source link

Show until today's date #541

Closed fabioplaka closed 3 years ago

fabioplaka commented 3 years ago

Hello

I have 2 questions about the usage of the library.

  1. How to limit react-native-modal-datetime-picker calendar until today's date?
  2. How to limit in a range of dates?

I will appreciate if I will have an answer as soon as possible.

Thanks in advance

mmazzarolo commented 3 years ago

@fabioplaka please check the documentation of https://github.com/react-native-datetimepicker/datetimepicker for the available props. TL;DR:

How to limit react-native-modal-datetime-picker calendar until today's date?

Use the minimumDate and maximumDate props

How to limit in a range of dates?

Same as above. You can't set specific dates though, only minimum and maximum ones.

mmazzarolo commented 3 years ago

https://github.com/mmazzarolo/react-native-modal-datetime-picker#how-can-i-set-a-minimum-andor-maximum-date