You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Fernando Wermus <fe...@gmail.com> on 2009/07/08 22:16:19 UTC
DateField and enabling some days
Hi all,
I've successfully pointed to DateTimeField which days I want the
calendar to have enabled.
@SuppressWarnings("unchecked") @Override protected void configure(Map
widgetProperties) {
super.configure(widgetProperties);
Date minDate = new DateTime().plusDays(1).toDate();
SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy");
widgetProperties.put("mindate", format.format(minDate));
}
Now, I have to do the same in *DateField*, but the constructor doesn't have
the configure method like I did in DateTimeField. I dont find the way to get
the same results.
I am using 1.3.6 version.
Do I have to ask for an enhancement?
Thanks in advance
--
Fernando Wermus.
www.linkedin.com/in/fernandowermus
Re: DateField and enabling some days
Posted by Fernando Wermus <fe...@gmail.com>.
Thanks
On Thu, Jul 9, 2009 at 6:44 AM, John Krasnay <jo...@krasnay.ca> wrote:
> Sorry, I don't know much about Date[Time]Field. Just trying to save you
> a few LoC.
>
> jk
>
> On Wed, Jul 08, 2009 at 01:35:13PM -0700, Fernando Wermus wrote:
> > thanks for the tip. Is there some way to solve what I commented?
> >
> > On Wed, Jul 8, 2009 at 1:25 PM, John Krasnay <jo...@krasnay.ca> wrote:
> >
> > > On Wed, Jul 08, 2009 at 01:16:19PM -0700, Fernando Wermus wrote:
> > > > Date minDate = new DateTime().plusDays(1).toDate();
> > > > SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy");
> > > > widgetProperties.put("mindate", format.format(minDate));
> > >
> > > FYI with Joda Time this can be reduced to this...
> > >
> > > widgetProperties.put("mindate",
> > > new DateTime().plusDays(1).toString("MM/dd/yyyy"));
> > >
> > > jk
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> >
> > --
> > Fernando Wermus.
> >
> > www.linkedin.com/in/fernandowermus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Fernando Wermus.
www.linkedin.com/in/fernandowermus
Re: DateField and enabling some days
Posted by John Krasnay <jo...@krasnay.ca>.
Sorry, I don't know much about Date[Time]Field. Just trying to save you
a few LoC.
jk
On Wed, Jul 08, 2009 at 01:35:13PM -0700, Fernando Wermus wrote:
> thanks for the tip. Is there some way to solve what I commented?
>
> On Wed, Jul 8, 2009 at 1:25 PM, John Krasnay <jo...@krasnay.ca> wrote:
>
> > On Wed, Jul 08, 2009 at 01:16:19PM -0700, Fernando Wermus wrote:
> > > Date minDate = new DateTime().plusDays(1).toDate();
> > > SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy");
> > > widgetProperties.put("mindate", format.format(minDate));
> >
> > FYI with Joda Time this can be reduced to this...
> >
> > widgetProperties.put("mindate",
> > new DateTime().plusDays(1).toString("MM/dd/yyyy"));
> >
> > jk
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
> --
> Fernando Wermus.
>
> www.linkedin.com/in/fernandowermus
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: DateField and enabling some days
Posted by Fernando Wermus <fe...@gmail.com>.
thanks for the tip. Is there some way to solve what I commented?
On Wed, Jul 8, 2009 at 1:25 PM, John Krasnay <jo...@krasnay.ca> wrote:
> On Wed, Jul 08, 2009 at 01:16:19PM -0700, Fernando Wermus wrote:
> > Date minDate = new DateTime().plusDays(1).toDate();
> > SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy");
> > widgetProperties.put("mindate", format.format(minDate));
>
> FYI with Joda Time this can be reduced to this...
>
> widgetProperties.put("mindate",
> new DateTime().plusDays(1).toString("MM/dd/yyyy"));
>
> jk
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
Fernando Wermus.
www.linkedin.com/in/fernandowermus
Re: DateField and enabling some days
Posted by John Krasnay <jo...@krasnay.ca>.
On Wed, Jul 08, 2009 at 01:16:19PM -0700, Fernando Wermus wrote:
> Date minDate = new DateTime().plusDays(1).toDate();
> SimpleDateFormat format = new SimpleDateFormat("MM/dd/yyyy");
> widgetProperties.put("mindate", format.format(minDate));
FYI with Joda Time this can be reduced to this...
widgetProperties.put("mindate",
new DateTime().plusDays(1).toString("MM/dd/yyyy"));
jk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org