Minimum Date for QDateTimeEdit - I want min date to be 3000 BC or -3000
-
Hi
I'm trying to change the min date to the earliest date possible but Qt currently restricts me to 9/14/52 12:00:00 AM.
If possible, I would like for the minimum date to be some date around -3000 or 3000 BC.
Is this possible?
If not, at the very least I'd like to be have minimum year of 0.How can I achieve this?
Thank you. -
welcome to devnet
Did you check out the "documentation of QDate? ":http://qt-project.org/doc/qt-4.8/qdate.html#range-of-valid-dates
No year number zero is existing "(see also)":http://en.wikipedia.org/wiki/Before_Christ#No_year_zero .
This is probably the reason to limit the date range.
-
Hi
Yes you are right abt year "0".
QDate goes far back..."The range of valid dates is from January 2nd, 4713 BCE, to sometime in the year 11 million CE.".But even then, I still can't set QDateTimeEdit to use dates as far back as January 2nd, 4713 BCE as the min date for QDateTimeEdit is
" The minimum date must be at least the first day in year 100, otherwise setMinimumDate() has no effect."O well...I guess I have to settle for an alternative.
Thank you very much. -
If you really want to, you can extend the class and override the required classes.