DateBox format

331 views
Skip to first unread message

3xM

unread,
Jul 21, 2012, 6:35:05 PM7/21/12
to gwt-bo...@googlegroups.com
hi,

i have trouble using DateBox. date format in text box after i choose date from calendar is wrong.
but, not always. if i set format to dd/mm/yy, or mm/dd/yy, its ok.

the problem is when i use MMM for Jul or MMMM for July; also EEE for day of week.

date is displayed fine before i choose another from calendar. for example:

db.setFormat("EEE, MMM d, ''yy"); - and its displayed ok, like this: Sun, Jul 22, '12

after i choose a date it is displayed like this: EEE, DecemberDec 22, ''12


i also noticed that any character after the last year digit is removed:

db.setFormat("dd.mm.yyyy."); displayed as 22.07.2012.
after selecting date it is: 22.07.2012

i looked at DateBoxBase source and it looks like setValue() method works fine, it is called from setFormat().
but, it is not called when date is selected from calendar! i could not find what method sets value of TextBox after user select date.

Ohashi, Keisuke

unread,
Jul 22, 2012, 9:35:18 PM7/22/12
to gwt-bo...@googlegroups.com
Umm...

Maybe It's format of GWT and bootstrap-datepicker difference .

Could you post a issue to our github issues?

But it may be next release.


Carlos Alexandro Becker

unread,
Aug 1, 2012, 6:47:59 PM8/1/12
to gwt-bo...@googlegroups.com
looks like the bootstrap-datepicker behavior...

in future, my plans are to just apply the styles in the GWT-datepicker.. but, I don't know when I'll have time for this, neither if it will work.

But, anyway, you can test it with the bootstrap-datepicker, and open a issue in their github project if it occurs.


thanks

3xM

unread,
Aug 1, 2012, 8:55:44 PM8/1/12
to gwt-bo...@googlegroups.com
yes, you're right. it is bootstrap-datepicker behaivour.

"the date format: combination of d, dd, m, mm, yy, yyy" - i tried to use MMM, MMMM, EEE

Carlos Alexandro Becker

unread,
Aug 1, 2012, 9:23:42 PM8/1/12
to gwt-bo...@googlegroups.com
yep, possibly because of the JavaScript Date parser... but not sure..

Segun Razaq Sobulo

unread,
Apr 22, 2014, 3:51:47 AM4/22/14
to gwt-bo...@googlegroups.com
Simply applying styles to GWT's datepicker would lose functionality like decade and year views. The decade view is particularly useful for a date of birth field, with gwt's date picker one has to scroll back through several months/years.

Drew Spencer

unread,
Apr 24, 2014, 7:21:50 AM4/24/14
to gwt-bo...@googlegroups.com
Possibly related to this issue I created recently: https://github.com/gwtbootstrap/gwt-bootstrap/issues/496
Reply all
Reply to author
Forward
0 new messages