In this article we will see how we can set the minimum date to the QDateEdit. Sometime there is a need to set minimum date so that user can’t enter date which are beyond the minimum date for example when user is asked to enter date for hotel booking, user should not be allowed to enter past dates then need for setting minimum date arises.
In order to do this we use
setMinimumDate method with the QDateEdit object
Syntax : date.setMinimumDate(date)
Argument : It takes QDate object 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