Class JCalendarPicker

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class JCalendarPicker extends JPanel
This class is just a backport of the IDV's old DateTimePicker.
See Also:
  • Field Details

    • dateChooser

      private com.toedter.calendar.JDateChooser dateChooser
      Date chooser
    • timeModel

      SpinnerDateModel
    • jc

      private com.toedter.calendar.JCalendar jc
      JCalendar
  • Constructor Details

    • JCalendarPicker

      public JCalendarPicker()
      Default constructor. Builds a JCalendarPicker with a null initial date and includes the "hour picker".
    • JCalendarPicker

      public JCalendarPicker(boolean includeHours)
      Creates a JCalendarPicker with a null initial date.
      Parameters:
      includeHours - Whether or not to include an hour picker.
    • JCalendarPicker

      public JCalendarPicker(Date date)
      Create a JCalendarPicker with the initial date.
      Parameters:
      date - Initial date. null is allowed.
    • JCalendarPicker

      public JCalendarPicker(Date date, String timeZoneId, boolean includeHours)
      Create a JCalendarPicker with the initial date.
      Parameters:
      date - Initial date. null is allowed.
      timeZoneId - Time zone identifier. If null, IdvConstants.DEFAULT_TIMEZONE is used.
      includeHours - true to have an hour picker.
      See Also:
  • Method Details

    • getDateChooser

      public com.toedter.calendar.JDateChooser getDateChooser()
    • getDate

      public Date getDate()
      Get the Date that has been set.
      Returns:
      Date that represents the user's selection.
    • getCalendar

      private Calendar getCalendar(Date date)
      Get the calendar for this instance.
      Parameters:
      date - The date. If null, the current time in the system's default time zone will be used instead.
      Returns:
      GregorianCalendar associated with date.
    • setDate

      public void setDate(Date date)
      Set the Date that will be used to populate the GUI components.
      Parameters:
      date - Date.
    • getUserSelectedDay

      Get the user's selection as a "YYYY-MM-DD" string. This method ignores time zones.
      Returns:
      Selected date as a "YYYY-MM-DD" string.