Introduction
This widget is a date time picker, supporting custom formatting options.
Details
Methods: | bool | IsDateValid() | - | returns true if the date-time string is valid | |:-------|:------------------|:--|:----------------------------------------------|
Properties: | DateTime | CurrentDate | gets/sets the current date-time | |:-----------|:----------------|:---------------------------------| | DateTimeFormatTypeEnum | DateTimeFormatType | gets/sets the current date-time format type | | Gdk.Color | ErrorColor | gets/sets the text color when format is invalid |
Events: |EventHandler| DateChanged | - raised when date-time value is changed | |:-------------|:----------------|:-----------------------------------------|
Formatting types:
- Custom
- FullDateTime
- ShortTime
- ShortDate
- LongDate
- LongTime
Custom format example:
this.dateEditWidget.DateTimeFormatType = HollyLibrary.DateTimeFormatTypeEnum.Custom; this.dateEditWidget.CustomFormat = "dd/MM/yyyy 'and time is:' HH:mm:ss"; this.dateEditWidget.CurrentDate = DateTime.Now;
Simple short date-only format example:
this.dateEditWidget.DateTimeFormatType = HollyLibrary.DateTimeFormatTypeEnum.ShortDate; this.dateEditWidget.CurrentDate = DateTime.Now;