Search code examples
javaswingjdatechooser

How to print DD/MM/YYYY on JDateChooser Field?


How to print DD/MM/YYYY on JDateChooser field?

JDateChooser jdc=new JDateChooser();

i am using JDateChooser for selecting date, But i also want to facilitate type date in DD/MM/YYYY format.

enter image description here


Solution

  • The api has a method setDateFormatString

    http://www.toedter.com/en/jcalendar/api/com/toedter/calendar/JDateChooser.html#setDateFormatString(java.lang.String)