Re: DateTimeField Error and Question
you can override the method newDateTextField(String, PropertyModel) and return a customized DateTextField object. gerolf On Thu, Jan 1, 2009 at 6:44 AM, tbt nadeesh...@yahoo.com wrote: Hi I am not sure if the DateTextField attribute in the DateTimeField class can be modified to change the calendar behavior. But you could use a TextField or a DateTextField and add a DatePicker instance to it like the following example TextField checkInField = new TextField(checkInField ,new PropertyModel(searchModel,checkInDate)); DatePicker checkInPicker = new DatePicker() { protected String getDatePattern() { return dd/MMM/; } }; checkInField.add(checkInPicker); regards -- View this message in context: http://www.nabble.com/DateTimeField-Error-and-Question-tp21221202p21239433.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DateTimeField Error and Question
As following: protected DateTextField newDateTextField(String id, PropertyModel dateFieldModel) { return DateTextField.forDateStyle(id, dateFieldModel, M-); } Adriano Gerolf Seitz wrote: you can override the method newDateTextField(String, PropertyModel) and return a customized DateTextField object. gerolf On Thu, Jan 1, 2009 at 6:44 AM, tbt nadeesh...@yahoo.com wrote: Hi I am not sure if the DateTextField attribute in the DateTimeField class can be modified to change the calendar behavior. But you could use a TextField or a DateTextField and add a DatePicker instance to it like the following example TextField checkInField = new TextField(checkInField ,new PropertyModel(searchModel,checkInDate)); DatePicker checkInPicker = new DatePicker() { protected String getDatePattern() { return dd/MMM/; } }; checkInField.add(checkInPicker); regards -- View this message in context: http://www.nabble.com/DateTimeField-Error-and-Question-tp21221202p21239433.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: DateTimeField Error and Question
Christoph Bach wrote: Hi, I am using the org.apache.wicket.extensions.yui.calendar.DateTimeField 1. If I enter a date say 1.1.1955 in the textfield, the textfield strips ist to 01.01.55. The first time I click on the Calendar icon, the calendar shows the year 1955. From the second click on, the Calendar shows the wrong year 2055. a, How can I avoid this Error? b, How can I tell the textfield of the DateTiemField to show a 4 digit year? 2. The Calendar has two Arrow-Icons to increment and decrement the month. Is it possible to show a dropdown for the year inside the calendar? Regards Christoph Hi I am not sure if the DateTextField attribute in the DateTimeField class can be modified to change the calendar behavior. But you could use a TextField or a DateTextField and add a DatePicker instance to it like the following example TextField checkInField = new TextField(checkInField ,new PropertyModel(searchModel,checkInDate)); DatePicker checkInPicker = new DatePicker() { protected String getDatePattern() { return dd/MMM/; } }; checkInField.add(checkInPicker); regards -- View this message in context: http://www.nabble.com/DateTimeField-Error-and-Question-tp21221202p21239433.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
DateTimeField Error and Question
Hi, I am using the org.apache.wicket.extensions.yui.calendar.DateTimeField 1. If I enter a date say 1.1.1955 in the textfield, the textfield strips ist to 01.01.55. The first time I click on the Calendar icon, the calendar shows the year 1955. From the second click on, the Calendar shows the wrong year 2055. a, How can I avoid this Error? b, How can I tell the textfield of the DateTiemField to show a 4 digit year? 2. The Calendar has two Arrow-Icons to increment and decrement the month. Is it possible to show a dropdown for the year inside the calendar? Regards Christoph