I currently mirror JDateChooser
to JTextField
, but now I need to mirror from JTextField
to JDateChooser
. How do I copy and convert a date from a text field to JDateChooser?
I use this way to send to JTextField
String dia = Integer.toString(JDateChooser1.getCalendar().get(Calendar.DAY_OF_MONTH));
String mes = Integer.toString(JDateChooser1.getCalendar().get(Calendar.MONTH) + 1);
String year = Integer.toString(JDateChooser1.getCalendar().get(Calendar.YEAR));
String fecha = (dia + "/" + mes + "/" + year);
EntradadadosData.setText(fecha);