Re: Locale issue with kendoui local date time picker
I'm afraid this is incomplete solution I can try to get all different AM/PM symbols, but solution seems to be incomplete :( According to this demo: http://demos.telerik.com/kendo-ui/datetimepicker/api Telerik own datetimepicker.value() JS getter returns GMT date/time Can it be used? On Sat, Apr 1, 2017 at 6:03 PM, Sebastien wrote: > Hi Maxim, > > Thanks for having looked into details! > > So, I am now doing a conversion as soon as the input is processed > (#getInput). The conversion is performed in an utility method [1] which > might be completed in the future (the user can still override > DatePicker#getInput() or TimePicker#getInput() to handle corner cases). > This is not a perfect solution because the displayed value still remains > with AM/PM. A custom DateTimeFormatter might solve the issue... > > [1] https://github.com/sebfz1/wicket-jquery-ui/blob/wicket8. > x/wicket-kendo-ui/src/main/java/com/googlecode/wicket/kendo/ui/utils/ > KendoDateTimeUtils.java#L53 > > SNAPSHOT is on its way. > > Thanks & best regards, > Sebastien > > > On Sat, Apr 1, 2017 at 7:00 AM, Maxim Solodovnik > wrote: > >> I guess, maybe client side processing can be added? >> i.e. value can be "normalized" before being accessible by wicket? >> >> On Sat, Apr 1, 2017 at 11:14 AM, Maxim Solodovnik >> wrote: >> >>> AM can also be: >>> AM: "နံနက်" >>> AM: "上午" >>> AM: "PD" >>> AM: "காலை" >>> AM: "dop." >>> >>> >>> Is there any well known method to get value from JS.min file? >>> >>> >>> -- WBR Maxim aka solomax
Re: Locale issue with kendoui local date time picker
Hi Maxim, Thanks for having looked into details! So, I am now doing a conversion as soon as the input is processed (#getInput). The conversion is performed in an utility method [1] which might be completed in the future (the user can still override DatePicker#getInput() or TimePicker#getInput() to handle corner cases). This is not a perfect solution because the displayed value still remains with AM/PM. A custom DateTimeFormatter might solve the issue... [1] https://github.com/sebfz1/wicket-jquery-ui/blob/wicket8.x/wicket-kendo-ui/src/main/java/com/googlecode/wicket/kendo/ui/utils/KendoDateTimeUtils.java#L53 SNAPSHOT is on its way. Thanks & best regards, Sebastien On Sat, Apr 1, 2017 at 7:00 AM, Maxim Solodovnik wrote: > I guess, maybe client side processing can be added? > i.e. value can be "normalized" before being accessible by wicket? > > On Sat, Apr 1, 2017 at 11:14 AM, Maxim Solodovnik > wrote: > >> AM can also be: >> AM: "နံနက်" >> AM: "上午" >> AM: "PD" >> AM: "காலை" >> AM: "dop." >> >> >> Is there any well known method to get value from JS.min file? >> >> >>
Re: Locale issue with kendoui local date time picker
I guess, maybe client side processing can be added? i.e. value can be "normalized" before being accessible by wicket? On Sat, Apr 1, 2017 at 11:14 AM, Maxim Solodovnik wrote: > AM can also be: > AM: "နံနက်" > AM: "上午" > AM: "PD" > AM: "காலை" > AM: "dop." > > > Is there any well known method to get value from JS.min file? > > > On Sat, Apr 1, 2017 at 11:10 AM, Maxim Solodovnik > wrote: > >> BTW problem is wider :( >> in wicket-kendo-ui-culture/src/main/resources/com/googlecode >> /wicket/kendo/ui/resource/cultures >> There are 25 files with "a.m." :( >> >> On Sat, Apr 1, 2017 at 10:08 AM, Maxim Solodovnik >> wrote: >> >>> Thanks for the investigation >>> I'll try to implement something like this: http://stackoverflow.com >>> /questions/13581608/displaying-am-and-pm-in-small-letter-aft >>> er-date-formatting/42466448#42466448 >>> Will let you know :) >>> >>> On Sat, Apr 1, 2017 at 3:23 AM, Sebastien wrote: >>> (transferring to users@) Hi Maxim, The #setLabel issue is because DateTimePicker is a composition (of a DatePicker and a TimePicker), therefore you need to set it in #newDateTime and #newTimePicker. If I supply DateTimePicker#label to underlying datepicker and timepicker, it will be unique/same for both components, and it will override any value that may have been set by the user (in case he wish to have 2 different labels). Maybe I can issue a warning if the user calls #setLabel... The am/pm issue is more problematic. Kendo states that colombian am/pm marker is a.m. and p.m. The problem is that this marker (with dots) just does not exists in Java, AFAIK. For the widget to work, both pattern (java & kendo) should be compatible. That's the reason why the java pattern can be optionally supplied to DateTimer & TimePicker ctors. But in your that case it does not help, except if there is a way to have a custom am/pm based on a DateTimeFormatter (it will requires a change to be able to supply the formatter to the widget) Conclusion : you can try to implement a DateTimeFormatter for this am/pm case, and I will update the API if you succeed, or we consider we are reaching a limitation and you fallback colombian to default es (I will deny having said that colombian is like spanish, okay?) Best regards (to Colombian people :)), Sebastien On Fri, Mar 31, 2017 at 1:41 PM, Maxim Solodovnik >>> > wrote: > Hello Sebastien, > > I'm still struggling with KendoUI LocalDateTime picker: > > Observations: > Everything works as expecting if I'm NOT ading KendoCultureHeaderItem > > What is wrong: > 1) Pre-selected time displayed as "11:00 PM", time in drop down is > displayed as "11:00 p.m." > 2) The method "setLabel" doesn't work :( (Label set is not being used > while displaying errors) > > Steps: > 1) clone https://github.com/solomax/ajax-download > 2) mvn jetty:run > 3) select any "Time" from dropdown > 4) click Submit > > Maybe you can suggest what am I doing wrong? > Thanks in advance! > > > -- > WBR > Maxim aka solomax > >>> >>> >>> -- >>> WBR >>> Maxim aka solomax >>> >> >> >> >> -- >> WBR >> Maxim aka solomax >> > > > > -- > WBR > Maxim aka solomax > -- WBR Maxim aka solomax
Re: Locale issue with kendoui local date time picker
AM can also be: AM: "နံနက်" AM: "上午" AM: "PD" AM: "காலை" AM: "dop." Is there any well known method to get value from JS.min file? On Sat, Apr 1, 2017 at 11:10 AM, Maxim Solodovnik wrote: > BTW problem is wider :( > in wicket-kendo-ui-culture/src/main/resources/com/ > googlecode/wicket/kendo/ui/resource/cultures > There are 25 files with "a.m." :( > > On Sat, Apr 1, 2017 at 10:08 AM, Maxim Solodovnik > wrote: > >> Thanks for the investigation >> I'll try to implement something like this: http://stackoverflow.com >> /questions/13581608/displaying-am-and-pm-in-small-letter- >> after-date-formatting/42466448#42466448 >> Will let you know :) >> >> On Sat, Apr 1, 2017 at 3:23 AM, Sebastien wrote: >> >>> (transferring to users@) >>> >>> Hi Maxim, >>> >>> The #setLabel issue is because DateTimePicker is a composition (of a >>> DatePicker and a TimePicker), therefore you need to set it in #newDateTime >>> and #newTimePicker. >>> If I supply DateTimePicker#label to underlying datepicker and >>> timepicker, it will be unique/same for both components, and it will >>> override any value that may have been set by the user (in case he wish to >>> have 2 different labels). Maybe I can issue a warning if the user calls >>> #setLabel... >>> >>> The am/pm issue is more problematic. Kendo states that colombian am/pm >>> marker is a.m. and p.m. The problem is that this marker (with dots) just >>> does not exists in Java, AFAIK. >>> For the widget to work, both pattern (java & kendo) should be >>> compatible. That's the reason why the java pattern can be optionally >>> supplied to DateTimer & TimePicker ctors. But in your that case it does not >>> help, except if there is a way to have a custom am/pm based on a >>> DateTimeFormatter (it will requires a change to be able to supply the >>> formatter to the widget) >>> >>> Conclusion : you can try to implement a DateTimeFormatter for this am/pm >>> case, and I will update the API if you succeed, or we consider we are >>> reaching a limitation and you fallback colombian to default es (I will deny >>> having said that colombian is like spanish, okay?) >>> >>> Best regards (to Colombian people :)), >>> Sebastien >>> >>> On Fri, Mar 31, 2017 at 1:41 PM, Maxim Solodovnik >>> wrote: >>> Hello Sebastien, I'm still struggling with KendoUI LocalDateTime picker: Observations: Everything works as expecting if I'm NOT ading KendoCultureHeaderItem What is wrong: 1) Pre-selected time displayed as "11:00 PM", time in drop down is displayed as "11:00 p.m." 2) The method "setLabel" doesn't work :( (Label set is not being used while displaying errors) Steps: 1) clone https://github.com/solomax/ajax-download 2) mvn jetty:run 3) select any "Time" from dropdown 4) click Submit Maybe you can suggest what am I doing wrong? Thanks in advance! -- WBR Maxim aka solomax >>> >>> >> >> >> -- >> WBR >> Maxim aka solomax >> > > > > -- > WBR > Maxim aka solomax > -- WBR Maxim aka solomax
Re: Locale issue with kendoui local date time picker
BTW problem is wider :( in wicket-kendo-ui-culture/src/main/resources/com/googlecode/wicket/kendo/ui/resource/cultures There are 25 files with "a.m." :( On Sat, Apr 1, 2017 at 10:08 AM, Maxim Solodovnik wrote: > Thanks for the investigation > I'll try to implement something like this: http://stackoverflow. > com/questions/13581608/displaying-am-and-pm-in-small- > letter-after-date-formatting/42466448#42466448 > Will let you know :) > > On Sat, Apr 1, 2017 at 3:23 AM, Sebastien wrote: > >> (transferring to users@) >> >> Hi Maxim, >> >> The #setLabel issue is because DateTimePicker is a composition (of a >> DatePicker and a TimePicker), therefore you need to set it in #newDateTime >> and #newTimePicker. >> If I supply DateTimePicker#label to underlying datepicker and timepicker, >> it will be unique/same for both components, and it will override any value >> that may have been set by the user (in case he wish to have 2 different >> labels). Maybe I can issue a warning if the user calls #setLabel... >> >> The am/pm issue is more problematic. Kendo states that colombian am/pm >> marker is a.m. and p.m. The problem is that this marker (with dots) just >> does not exists in Java, AFAIK. >> For the widget to work, both pattern (java & kendo) should be compatible. >> That's the reason why the java pattern can be optionally supplied to >> DateTimer & TimePicker ctors. But in your that case it does not help, >> except if there is a way to have a custom am/pm based on a >> DateTimeFormatter (it will requires a change to be able to supply the >> formatter to the widget) >> >> Conclusion : you can try to implement a DateTimeFormatter for this am/pm >> case, and I will update the API if you succeed, or we consider we are >> reaching a limitation and you fallback colombian to default es (I will deny >> having said that colombian is like spanish, okay?) >> >> Best regards (to Colombian people :)), >> Sebastien >> >> On Fri, Mar 31, 2017 at 1:41 PM, Maxim Solodovnik >> wrote: >> >>> Hello Sebastien, >>> >>> I'm still struggling with KendoUI LocalDateTime picker: >>> >>> Observations: >>> Everything works as expecting if I'm NOT ading KendoCultureHeaderItem >>> >>> What is wrong: >>> 1) Pre-selected time displayed as "11:00 PM", time in drop down is >>> displayed as "11:00 p.m." >>> 2) The method "setLabel" doesn't work :( (Label set is not being used >>> while displaying errors) >>> >>> Steps: >>> 1) clone https://github.com/solomax/ajax-download >>> 2) mvn jetty:run >>> 3) select any "Time" from dropdown >>> 4) click Submit >>> >>> Maybe you can suggest what am I doing wrong? >>> Thanks in advance! >>> >>> >>> -- >>> WBR >>> Maxim aka solomax >>> >> >> > > > -- > WBR > Maxim aka solomax > -- WBR Maxim aka solomax
Re: Locale issue with kendoui local date time picker
Thanks for the investigation I'll try to implement something like this: http://stackoverflow.com/questions/13581608/displaying-am-and-pm-in-small-letter-after-date-formatting/42466448#42466448 Will let you know :) On Sat, Apr 1, 2017 at 3:23 AM, Sebastien wrote: > (transferring to users@) > > Hi Maxim, > > The #setLabel issue is because DateTimePicker is a composition (of a > DatePicker and a TimePicker), therefore you need to set it in #newDateTime > and #newTimePicker. > If I supply DateTimePicker#label to underlying datepicker and timepicker, > it will be unique/same for both components, and it will override any value > that may have been set by the user (in case he wish to have 2 different > labels). Maybe I can issue a warning if the user calls #setLabel... > > The am/pm issue is more problematic. Kendo states that colombian am/pm > marker is a.m. and p.m. The problem is that this marker (with dots) just > does not exists in Java, AFAIK. > For the widget to work, both pattern (java & kendo) should be compatible. > That's the reason why the java pattern can be optionally supplied to > DateTimer & TimePicker ctors. But in your that case it does not help, > except if there is a way to have a custom am/pm based on a > DateTimeFormatter (it will requires a change to be able to supply the > formatter to the widget) > > Conclusion : you can try to implement a DateTimeFormatter for this am/pm > case, and I will update the API if you succeed, or we consider we are > reaching a limitation and you fallback colombian to default es (I will deny > having said that colombian is like spanish, okay?) > > Best regards (to Colombian people :)), > Sebastien > > On Fri, Mar 31, 2017 at 1:41 PM, Maxim Solodovnik > wrote: > >> Hello Sebastien, >> >> I'm still struggling with KendoUI LocalDateTime picker: >> >> Observations: >> Everything works as expecting if I'm NOT ading KendoCultureHeaderItem >> >> What is wrong: >> 1) Pre-selected time displayed as "11:00 PM", time in drop down is >> displayed as "11:00 p.m." >> 2) The method "setLabel" doesn't work :( (Label set is not being used >> while displaying errors) >> >> Steps: >> 1) clone https://github.com/solomax/ajax-download >> 2) mvn jetty:run >> 3) select any "Time" from dropdown >> 4) click Submit >> >> Maybe you can suggest what am I doing wrong? >> Thanks in advance! >> >> >> -- >> WBR >> Maxim aka solomax >> > > -- WBR Maxim aka solomax
Re: Locale issue with kendoui local date time picker
(transferring to users@) Hi Maxim, The #setLabel issue is because DateTimePicker is a composition (of a DatePicker and a TimePicker), therefore you need to set it in #newDateTime and #newTimePicker. If I supply DateTimePicker#label to underlying datepicker and timepicker, it will be unique/same for both components, and it will override any value that may have been set by the user (in case he wish to have 2 different labels). Maybe I can issue a warning if the user calls #setLabel... The am/pm issue is more problematic. Kendo states that colombian am/pm marker is a.m. and p.m. The problem is that this marker (with dots) just does not exists in Java, AFAIK. For the widget to work, both pattern (java & kendo) should be compatible. That's the reason why the java pattern can be optionally supplied to DateTimer & TimePicker ctors. But in your that case it does not help, except if there is a way to have a custom am/pm based on a DateTimeFormatter (it will requires a change to be able to supply the formatter to the widget) Conclusion : you can try to implement a DateTimeFormatter for this am/pm case, and I will update the API if you succeed, or we consider we are reaching a limitation and you fallback colombian to default es (I will deny having said that colombian is like spanish, okay?) Best regards (to Colombian people :)), Sebastien On Fri, Mar 31, 2017 at 1:41 PM, Maxim Solodovnik wrote: > Hello Sebastien, > > I'm still struggling with KendoUI LocalDateTime picker: > > Observations: > Everything works as expecting if I'm NOT ading KendoCultureHeaderItem > > What is wrong: > 1) Pre-selected time displayed as "11:00 PM", time in drop down is > displayed as "11:00 p.m." > 2) The method "setLabel" doesn't work :( (Label set is not being used > while displaying errors) > > Steps: > 1) clone https://github.com/solomax/ajax-download > 2) mvn jetty:run > 3) select any "Time" from dropdown > 4) click Submit > > Maybe you can suggest what am I doing wrong? > Thanks in advance! > > > -- > WBR > Maxim aka solomax >