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
1
vote
1 answer

Calculating age from jDateChooser using ZoneId keeps returning 0

Im trying to calculate a users age based on their DOB input and compare it with todays date to work out their age in years. If they are under 12 they will be denied. int YearDiff; public void ageCalc() { ZoneId nowBrit =…
Dzl
  • 49
  • 8
1
vote
1 answer

propertychangelistener on a JDateChooser gets triggered 2 times additionally even when the listener is detached while setting the date programatically

I am using JDateChooser for a java swing project I am developing and in this, the date could be set in two ways: by the end user or programmatically. So I have defined a propertychangelistener in the respective class(the variable trig is initialised…
Hari Kiran
  • 188
  • 13
1
vote
1 answer

Add listener jDateChooser

i haved create this metod for add listeners in my dataChooser. public final void añadirEsccuhaDataChoser() { jDateChooser1.getDateEditor().addPropertyChangeListener((PropertyChangeEvent e) -> { if ("date".equals(e.getPropertyName())) { …
1
vote
1 answer

how to change calendar's size of JDateChooser

I want change calendar's size to fit JDateChooser component's horizontal size Help me~ here is my code JDateChooser dateChooser = new JDateChooser(); dateChooser.setDateFormatString("yyyy-MM-dd"); dateChooser.setBounds(329, 10, 171,…
tokhi
  • 135
  • 1
  • 8
1
vote
1 answer

jDateChoose not working

I am using a jDate Chooser in a Java Project of mine I am required to retrieve the date from the jDateChooser and put it into mySQL table the methods i have used are newBirthDate=(Date)inBirthDate.getDate(); newBirthDate is a date variable (data…
coder123
  • 25
  • 9
1
vote
1 answer

how to update date by jdatechooser in java eclipse

when i try to update date by jdatechooser date cannot be saved in database, in database date doesn't show only show date format like i update 02/08/2014 in database date saved by MM/dd/yyyy? i am using sqlite database and eclipse juno …
Usama Fayyaz
  • 95
  • 2
  • 12
1
vote
0 answers

How to make user search by entering either one of the given fields?

enter image description here I want to make the user able to search if he enters values for at least one of the fields given above. I captured the date selected from the JDateChooser as given below. String s =…
lasinicl
  • 161
  • 1
  • 11
1
vote
1 answer

How can i change JDateChooser background and foreground color

I need to change JDateChooser background and foreground color, i changed the color using LaF property window,but nothing happens Then i also used following code to solve this, BorrowDateChooser.setBackground(new Color(51,51,51)); but it also not…
Sachith Wickramaarachchi
  • 5,546
  • 6
  • 39
  • 68
1
vote
1 answer

get date and display in a lable? And how can i convert it to a string(date)

I want this date which have picked form jdateChooser to converted into string and displayed init jlable java.util.Date date = jDateChooser1.getDate(); date.toInstant(); jLabel16.setText(date);
1
vote
2 answers

Display date from data base in JDateChooser

I am working on a java project using SQL and I need to display the current date on a JDateChooser. Before my client change it with his need I used this in the constuctor java.sql.Date date = new java.sql.Date(new…
1
vote
2 answers

Format JTable Cell

I have a JTable 6 columns,Column 1 and Column 2 Cells have JDateChooserCellEditor(), i am getting following values like this 11 Mar, 2016,12 Mar, 2016.But I want to format JDateChooserCellEditor() to show something like this 11 Mar, 2016 HH:mm and…
akathir79
  • 31
  • 4
1
vote
0 answers

Java JDatePicker Display Date to Field

I have a JDatePicker element in my GUI and it is being created by an external class function called datePicker.java which returns the JDatePickerImpl object. JDatePickerImpl inptDate = new datePicker().date; This works fine and I can enter a date…
TheLovelySausage
  • 3,838
  • 15
  • 56
  • 106
1
vote
2 answers

Set jdatepickerimpl blank once date is selected

I am trying to write a piece of code on reset button. What I am trying to do is: First I select date and then I press reset button On click of reset button, the date field should get blank. I searched a lot on net most of example saying to use…
Pramod Yadav
  • 245
  • 2
  • 20
1
vote
2 answers

select date from jdatechooser and automatically diplay age in a Textfield

i'm trying to get the selected date from Jdatechooser and display the age corresponding to the date in a Textfield, i saw all the threads discussing this problem but it doesn"t work for me.here is my code: private void…
Sam
  • 17
  • 6
1
vote
2 answers

Calculate Difference between two JDateChooser Value

This is my codes but this is not working. Start.getDate(); End.getDate(); int diffInDays = (int)( (Start.getDate() - End.getDate()) / (1000 * 60 * 60 * 24)); System.out.println(diffInDays); So how can i make a program that the user…
Xyryle Buen
  • 43
  • 2
  • 12
1 2
3
12 13