In this article we will see how we can set the date range to the QDateEdit. Date range means that user can only enter that date which lies within the set range. Sometimes there is a need to set date range for example when user is asked to select the date for meeting within 10 days then need of setting range arises. Individually we can set minimum and maximum date with the help of
setMaximumDate methods respectively.
In order to do this we use
setDateRange method with the QDateEdit object
Syntax : date.setDateRange(min, max)
Argument : It takes two QDate object as argument argument
Return : It returns None
Below is the implementation
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course