First time here? Check out the FAQ!
when i choose a date and click, the datebox display another date,usually 1 or 2 days after the day i selected. time also changes automaticlly after i select a time.
<datebox format="yyyy-MM-dd ahh:mm"
onCreate="self.value = new Date()" width="250px" showTodayLink="true" locale="zh"/>
i'me using zk 8.5.0CE with openjdk 1.8 on linux. this happens sometimes,not always.
another problem is when select time in the poped box, the value in the datebox changes, but when the poped box disappear( by click blank places or press enter), the value of the datebox's time changes to another value.
third problem is when click today ,the value of the datebox doesn't change.you had to click the date.
4th problem is disable donesn't work on datebox.
With #1 and #2 there seems to be a problem with the date format parsing for your specific format
format="yyyy-MM-dd ahh:mm"
as a workaround you can add a space between a
and hh
-> format="yyyy-MM-dd a hh:mm"
-> official issue: ZK-4068
demonstrated in this zkfiddle
the example also shows that the disabled
-property (your problem #4) should work. (can you provide a non-working example?)
About #3, that's the current behavior and not a bug, it navigates to today but doesn't select it immediately similar to the keyboard controls:
Here an example overriding the _clickToday function to also update the datebox' value -> http://zkfiddle.org/sample/3vkuate/2-datebox-custom-today-link
UPDATE 2020-11-19
ZK-4068 will be fixed in 9.5.1
Asked: 2018-09-21 12:52:33 +0800
Seen: 27 times
Last updated: Nov 19 '20