I have a custom linear layout which has DatePicker and TimePicker widgets in it. This is used as DateTime picker. I want to restrict t
For future readers!
Actually with new android material design components what you want achieve could be achieved using MaterialDatePicker. And dates outside the allowed range is not selectable.
Steps
1. Add material dependency to your module's gradle file
implementation 'com.google.android.material:material:1.1.0-beta01'
2. Change app theme to inherit from a version of material theme.
ex: