JSpinner + SpinnerDateModel not working as expected
- From: Matthias Kaeppler <void@xxxxxxxx>
- Date: Sun, 07 May 2006 10:55:14 +0200
Hi,
I want to perform a supposedly simple (?) task:
I need the client to select a timespan in which a certain taks is to be performed. Therefore, I have create 4 JSpinners with SpinnerDateModelS, in order to let the user select a start date, a start time, an end date and an end time.
Of course, I want the Spinners to roll the date according to its displayed granularity, e.g. in the date fields by DAY_OF_MONTH and in the time fields by MINUTE.
However, regardless to which value I set the calendarField attribute of the SpinnerDateModelS, when spinning the dates/times with the spinners, the unit is always DAY_OF_MONTH.
If I manually check the amount of change performed by getPreviousValue() and getNextValue() (which I suppose are called when someone spins the field?!), then the amount of change is correct (that means as indicated by calendarField).
How come? Where is the logic in having a field to specify the amount of change of one spin, when it is simply ignored when I actually spin the field? Ain't the getPreviousValue() and getNextValue() called by the JSpinner change listeners?
Thanks,
Matthias
.
- Follow-Ups:
- Re: JSpinner + SpinnerDateModel not working as expected
- From: Michael Dunn
- Re: JSpinner + SpinnerDateModel not working as expected
- Prev by Date: Re: I have 2 JLists. How can I find which JList user clicked?
- Next by Date: Re: JSpinner + SpinnerDateModel not working as expected
- Previous by thread: Closable Panel or any alternative
- Next by thread: Re: JSpinner + SpinnerDateModel not working as expected
- Index(es):
Relevant Pages
|