Im using a DatePicker as part of a form. What i would like is for todays date to be in the JTexfield thats with the JDatePicker when the form opens.
If i use :
UtilDateModel model = new UtilDateModel();
model.setDate(2014, 06, 06);
JDatePanelImpl datePanel = new JDatePanelImpl(model);
JDatePickerImpl datePicker = new JDatePickerImpl(datePanel);
All it does is set the date in the popup box. What i need it to do is be on the form as soon as it opens
I want it to be like this when its first opened.

But its like this

Found the answer.
Ue the method
model.setSelected(true);
After setting the initial time.
Use the method
model.setSelected(true);
After setting the initial time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With