JJ 13.10.15 - fix datepicker
This commit is contained in:
@@ -901,6 +901,8 @@ Public Class ClassControlBuilder
|
||||
control.TabIndex = tabindex
|
||||
control.TabStop = tabstop
|
||||
control.Parent = _master_panel
|
||||
control.Properties.NullDate = DateTime.MinValue
|
||||
control.Properties.NullText = String.Empty
|
||||
|
||||
If _new And IsNothing(parent) Then
|
||||
control.Location = Me.GetCursorPosition()
|
||||
|
||||
@@ -76,11 +76,13 @@ Public Class ClassControlValues
|
||||
Dim combobox As ComboBox = DirectCast(control, ComboBox)
|
||||
combobox.SelectedIndex = combobox.FindStringExact(result)
|
||||
Case 4 'DateTimePicker
|
||||
If result = "" Then
|
||||
result = Now
|
||||
End If
|
||||
Dim datepicker As DevExpress.XtraEditors.DateEdit = DirectCast(control, DevExpress.XtraEditors.DateEdit)
|
||||
datepicker.DateTime = Date.Parse(result)
|
||||
|
||||
If result = "" Or result = "00:00:00" Then
|
||||
datepicker.DateTime = DateTime.MinValue
|
||||
Else
|
||||
datepicker.DateTime = Date.Parse(result)
|
||||
End If
|
||||
Case 13 ' Listbox
|
||||
Dim listbox As DevExpress.XtraEditors.ListBoxControl = DirectCast(control, DevExpress.XtraEditors.ListBoxControl)
|
||||
listbox.SelectedIndex = listbox.FindStringExact(result)
|
||||
|
||||
Reference in New Issue
Block a user