wicket- jqueryui Kendo DateTimePicker timePattern

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

wicket- jqueryui Kendo DateTimePicker timePattern

Pierre
Hi,

In   com.googlecode.wicket.jquery.ui.kendo.datetime.DateTimePicker

How Can I change the  Time pattern  ?. Instead of having the list  00:00 00:30 1:00 ....23:30
 I would like to have only my  own 9:00  9:45 10:30 11:15   for exemple.
 Thank for your help.
 
Pierre
Reply | Threaded
Open this post in threaded view
|

Re: wicket- jqueryui Kendo DateTimePicker timePattern

Sebastien
Hi,

According to the Kendo UI's doc [1], you need to set the following options:

Options options = new Options();
options.set("interval", 45);
options.set("min", "new Date(2000, 0, 1, 9, 0, 0)"); //9:00:00, the date
part is ignored

final TimePicker timepicker = new TimePicker("timepicker", model, options);
form.add(timepicker);

Hope this helps,
Sebastien.

[1] http://docs.kendoui.com/api/web/timepicker#configuration-interval


On Thu, Oct 17, 2013 at 4:51 PM, Selom <[hidden email]> wrote:

> Hi,
>
> In   *com.googlecode.wicket.jquery.ui.kendo.datetime.DateTimePicker*
>
> How Can I change the  Time pattern  ?. Instead of having the list  00:00
> 00:30 1:00 ....23:30
>  I would like to have only my  own *9:00  9:45 10:30 11:15*   for exemple.
>  Thank for your help.
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/wicket-jqueryui-Kendo-DateTimePicker-timePattern-tp4661862.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: wicket- jqueryui Kendo DateTimePicker timePattern

Pierre
Hi,
Sorry I did not explain very well my problem.
I am using the DateTimePicker (because i need the date ) class and there no   constructor with such options   ?

Thanks.

Pierre
Reply | Threaded
Open this post in threaded view
|

Re: wicket- jqueryui Kendo DateTimePicker timePattern

Sebastien
Hi,

You can override DateTimePicker#newTimePicker

Best regards,
Sebastien.


On Fri, Oct 18, 2013 at 9:53 AM, Selom <[hidden email]> wrote:

> Hi,
> Sorry I did not explain very well my problem.
> I am using the DateTimePicker (because i need the date ) class and there no
> constructor with such options   ?
>
> Thanks.
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/wicket-jqueryui-Kendo-DateTimePicker-timePattern-tp4661862p4661867.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: wicket- jqueryui Kendo DateTimePicker timePattern [RESOLVED]

Pierre
Hello Sebastien,

I did it like this.

final DateTimePicker startDateTimePicker = new DateTimePicker("start","dd/MM/yyyy","HH:mm"){
                       
                        @Override
                        protected TimePicker newTimePicker(String id, IModel<Date> model, String timePattern)
                        {
                                 Options options = new Options();
                                 
                                 options.set("interval",45);
                                 options.set("min", "new Date(2000, 0, 1, 9, 0, 0)");
                                 options.set("max", "new Date(2020, 0, 1, 12, 0, 0)");
                         return new  TimePicker(id, model, timePattern,  options);
                                //return new TimePicker(id, model, timePattern);
                        }
                       
                };

And I enjoyed.

Thank you for  you help.

Sebastien wrote
Hi,

You can override DateTimePicker#newTimePicker

Best regards,
Sebastien.


On Fri, Oct 18, 2013 at 9:53 AM, Selom <[hidden email]> wrote:

> Hi,
> Sorry I did not explain very well my problem.
> I am using the DateTimePicker (because i need the date ) class and there no
> constructor with such options   ?
>
> Thanks.
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/wicket-jqueryui-Kendo-DateTimePicker-timePattern-tp4661862p4661867.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Pierre