java - Strange behavior in Nebula CDateTime -


i trying cdatetime cell editor swt table control. when run standalone cdatetime sample (from here), looks like:

regular cdt behavior

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:

cdatetime cell editor

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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -