0

datebox value not correct

asked 2018-09-21 12:52:33 +0800

superium gravatar image superium
0

updated 2018-09-21 13:14:20 +0800

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.

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-09-27 12:50:57 +0800

cor3000 gravatar image cor3000
4193 1 7
ZK Team

updated 2018-09-27 14:20:04 +0800

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

link publish delete flag offensive edit
0

answered 2018-10-09 11:11:04 +0800

superium gravatar image superium
0

Thank you very much. your method works.

i got something wrong in #4. sorry for my mistake.

link publish delete flag offensive edit

Comments

thanks for the update!

cor3000 ( 2018-10-09 16:07:40 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2018-09-21 12:52:33 +0800

Seen: 12 times

Last updated: Oct 09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More