java - Strange behavior in Nebula CDateTime -
i trying cdatetime cell editor swt table control. when run standalone cdatetime sample (from here), looks like:
the cdatetime created this:
final cdatetime cdt = new cdatetime(shell, cdt.drop_down | cdt.date_short | cdt.compact); cdt.setselection(new date());
notice icon causing drop down - looks calendar. can see month/year, , there 2 arrow buttons , "today" button in left corner of header. date written textbox correctly when select date.
however, when try add cell editor, looks like:
notice icon different , header parts different. notice how selected date , weird number - month of 32! - in text box. when popup goes away, date correct, strange behavior looks odd , worrying.
i created cdatetime this:
final int style = getstyle() | cdt.date_short | cdt.drop_down | cdt.compact ; this.datetime = new cdatetime(parent, style); this.datetime.setpattern("mm/dd/yyyy");
what doing wrong?
i know old question, here answer: pattern set wrong, "mm" represents minutes. instead can use "mm" month:
datetime.setpattern("mm/dd/yyyy");
Comments
Post a Comment