Question

The standard behaviour is, that as soon as the day reaches 31 the step-up button stops working. I'd like it to reset to 1 and jump to the next month.

Was it helpful?

Solution

I have not had the opportunity to test this, but I know that QDateEdit implements QAbstractSpinBox, so you should be able to call

myDateEdit.setWrapping(True)

which should accomplish what you want.

Doc Link

Update:

The term for this behaviour is apparently called "rollover" and here is one person's implementation, which (again, I haven't tested it) appears to be another potential solution:

Rollover QDateEdit

He makes the point that his implementation doesn't consider min or max dates though.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top