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