Questions tagged [jdatechooser]

JDateChooser is a sub-component of JCalendar, a Java date chooser bean for selecting a date.

JDateChooser is a bean composed of an IDateEditor (for direct date editing) and a button for opening a JCalendar for selecting the date. Source: JCalendar.

194 questions
9
votes
2 answers

Is it possible to detect a date change on a JCalendar JDateChooser field?

I'd like to detect when the date is changed in a JDateChooser field so that I can update another field. Is this possible? And if so where should I be starting? I've already looked at the documentation and unfortunately there are no methods for…
ghickman
  • 5,893
  • 9
  • 42
  • 51
6
votes
3 answers

How do we disable editing options on JDateChooser?

I am using a JDateChooser to allow the user to input date. How do I disable editing option on the text field that appears? I would not want the user to type anything in that text field - input should only be entered by clicking from the calendar.…
CN1002
  • 1,115
  • 3
  • 20
  • 40
5
votes
2 answers

Display JDateChooser in JOptionPane

I want to display a JDateChooser component inside an Option pane depending on some selection from the user. The point is that I tried getting the JDateChooser the way I want it to appear using next code: JOptionPane.showInputDialog(null, new…
Josué Almonasi
  • 143
  • 1
  • 14
4
votes
3 answers

Unwanted data using JDateChooser in JCalendar

I am using JDateChooser in JCalendar (with Swing). I am trying to get a format of "yyyy-MM-dd", but for some reason I get the time also and it's always the same(00:00:00 MDT). Anyone has an idea how to get rid of the time? Thanks in advance. try { …
Paul Kar.
  • 1,293
  • 2
  • 21
  • 32
4
votes
2 answers

How should I install JDateChooser?

I've discover this JDateChooser from searching how to use Item Combobox at Java Swing. Do you know how to install this? Here is the link JDateChooser I can't find any instructions on how to install it.. Can you share some instructions on how to…
iamanapprentice
  • 411
  • 5
  • 19
  • 37
4
votes
1 answer

Show only months and years with JDatePicker

I am trying to use JDatePicker to display a calendar. However, I only want to display months and years, not the days. I tried poking around the model and JDatePickerImpl objects, without luck. Here is the code I have to show the JDatePicker, from…
Benoit Goderre
  • 527
  • 2
  • 9
  • 25
3
votes
1 answer

How can i make only mondays selectable in Java's JCalendar?

I'm using the JCalendar datepicker and would like to know if there's a way to make only certain weekdays (e.g Monday) selectable via the JDateChooser component? Does anyone know how to do it?
3
votes
2 answers

JDBC - ORA-01861: literal does not match format string 01861

I have problem with retrieving a data from oracle data base I want to access data by using two JDatechoosers... I use JDatechooser to store date value in database of type date. chooser=new JDateChooser(); chooser.setBounds (200, 175, 175,…
Durga Prasad
  • 31
  • 1
  • 1
  • 3
3
votes
2 answers

How to get the difference in days between two JDateChooser objects

I'd like to know the difference in days (excluding time). These are my JDateChooser objects: JDateChooser dateChooser_in = new JDateChooser(); JDateChooser dateChooser_out = new JDateChooser(); I tried to convert it to Date first, but I don't know…
STEPHEN YAO
  • 105
  • 2
  • 2
  • 7
3
votes
5 answers

Get jDateChooser date to jLabel

This is my infernal problem. nowadays i'm trying to create my project according to my Degree. I already have added jcalender to my project in netbeans, and i already added jDateChooser to my jFrame. my problem is, when i chooseing a date from…
3
votes
3 answers

How to detect if the user changed JDateChooser date and not anything else setting the date property?

I use JDateChooser to edit dates in my form. Short version: I need to distinguish between user date edit and programmatical property change on a JDateChooser. Workaround: I've found a protected JDateChooser property named dateSelected which is…
user1713059
  • 1,425
  • 2
  • 17
  • 34
2
votes
1 answer

When I try enter date chosen by Jdatechooser it I get the Error "data exception: invalid datetime format"

I want to input into my MS Access table the date that the user inputs using the Jdatechooser. In Access I have set the Date/time column to 'short date', but any format I try won't work. Help! try { Connection…
Hassan Zaidi
  • 41
  • 1
  • 7
2
votes
1 answer

get a date using a JDateChooser and save it into mysql database

I need to read a date from a JDateChooser and save it into a MYSQL database table using the ActionPerformed method of a JButton. There are three JDateChoosers called LETTER_DATE , RECEIVED_DATE , SENDING_DATE in this JInternalFrameForm called…
Jay K
  • 37
  • 1
  • 10
2
votes
3 answers

How do I format JDateChooser into dd-mm-yyyy?

I am trying to output the current date format into: DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");, but it is outputting like this: Fri Dec 02 14:03:59 AEST 2016 Here is my code: JDateChooser datePurchased = new…
juiceb0xk
  • 949
  • 3
  • 19
  • 46
2
votes
1 answer

Working with jYearChooser and jMonthChooser

i'm working in java swing and i need to get year a jYearChooser and month from a jMonthChooser and then format it to this format "yyyy-MM-dd 00:00:00" Here is my code , but it doesn't give the expected output int year = jYearChooser1.getYear(); int…
1
2 3
12 13