0

How can I restrict what dates can be selected in JCalendar ? In particular, I want to make it impossible to select any date before today's date.

Ernest Friedman-Hill
  • 80,601
  • 10
  • 150
  • 186
Kapil
  • 320
  • 6
  • 10
  • 23
  • 1
    Can you elaborate? With an example if possible.,.. Other wise this is just a downvote magnet... – Thihara Jun 26 '13 at 11:16
  • @Thihara I am making project using java swing, for that i am using NetBeans IDE 7.3.in that i create one java project, after creating new java project i have create one package in it and take Jpanel in that package. after all this stuff i have took one Jcalender and put JPanel.this run properly,but i want to disable previous date in that Jcalender – Kapil Jun 26 '13 at 11:21
  • What do you mean by disable previous date? Do you want that no date that is before today can be selected? – André Stannek Jun 26 '13 at 11:23
  • yes. User cant select date before system date. – Kapil Jun 26 '13 at 11:25
  • for example i want to select date for product bill.for that i click on calender, now in that calender i cant select previous date. this is my requirement. – Kapil Jun 26 '13 at 11:28
  • what is this jcalender? Are you talking about JCalender? Can you add it as a tag? – Oliver Watkins Jun 26 '13 at 11:28
  • But i cant fullfill my requirement using that question – Kapil Jun 26 '13 at 11:30
  • Which JCalendar are you referring to? Is it [this one](http://www.toedter.com/en/jcalendar/)? – Aleks G Jun 26 '13 at 11:30
  • Aleks . yes i use this one – Kapil Jun 26 '13 at 11:32
  • @stonedsquirrel, indeed, it is. – Ernest Friedman-Hill Jun 26 '13 at 11:34
  • I don't think it supports setting the minimum date. You can only set the minimum year using `jcal.getYearChooser().setStartYear(Calendar.getInstance().get(Calendar.YEAR))` – Aleks G Jun 26 '13 at 11:38

0 Answers0