@ Override public void setEnabled ( boolean enabled ) { super . setEnabled ( enabled ) ; datePicker . setEnabled ( enabled ) ; timePicker . setEnabled ( enabled ) ; }
setEnabled This enables or disables the DateTimePicker . When the component is enabled dates and times can be selected by the user using any methods that are allowed by the current settings . When the component is disabled there is no way for the user to interact with the components . More specifically dates and times cannot be selected with the mouse or with the keyboard and the date and time pickers change their color scheme to indicate the disabled state . Any currently stored text and last valid values are retained while the component is disabled .