You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Christoph Bach <ba...@yahoo.de> on 2008/12/30 19:29:30 UTC
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
Re: DateTimeField Error and Question
Posted by Adriano dos Santos Fernandes <ad...@uol.com.br>.
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 <na...@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/yyyy";
>> }
>> };
>> 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-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: DateTimeField Error and Question
Posted by Gerolf Seitz <ge...@gmail.com>.
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 <na...@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/yyyy";
> }
> };
> 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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: DateTimeField Error and Question
Posted by tbt <na...@yahoo.com>.
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/yyyy";
}
};
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org