Bold BI®Unlock stunning dashboards with Bold BI®: 35+ widgets, 150+ data sources, AI agent & more. Try it for free!
date format of control is - dd/MM/yyyy
and consider today date is 29/09/2022
If user tries to change the date from 29/09 to 31/10 then.. we are not able to change the date in one go from keyboard. as first focus will go on day.. and 31 day doesn't fall in September month. so first we have to change month and then day....
Their should be some easy way so that datetimepicker can allow to change day then month and then year.
we should be able to type 31/10/2022 while overwrite date on 29/09/2022.
Hi Singh,
As DateTimePickerAdv is a classic control, could you please use SfDateTimeEdit control which already has this behavior? For your reference, kindly refer to the sample below.
Regards,
Harinath N
Same issue in this control also. If i use DateTimeEditingMode.Mask...
Main point is i need AutoForwarding /Mask....(In mask mode overwrite date )
'
Me.SfDateTimeEdit1.Cursor = System.Windows.Forms.Cursors.Default
Me.SfDateTimeEdit1.DateTimeEditingMode = Syncfusion.WinForms.Input.Enums.DateTimeEditingMode.Mask
Me.SfDateTimeEdit1.DateTimePattern = Syncfusion.WinForms.Input.Enums.DateTimePattern.Custom
Me.SfDateTimeEdit1.Format = "dd/MM/yyyy"
Me.SfDateTimeEdit1.Location = New System.Drawing.Point(383, 106)
Me.SfDateTimeEdit1.Name = "SfDateTimeEdit1"
--------------------------------------------------------------------------
In datetimepickeradv. i am using following properties.
DateTimePickerAdv1.Format = System.Windows.Forms.DateTimePickerFormat.Custom
DateTimePickerAdv1.CustomFormat = "dd/MM/yyyy"
DateTimePickerAdv1.NullString = "(none)"
DateTimePickerAdv1.ShowCheckBox = False
DateTimePickerAdv1.IsNullDate = True
DateTimePickerAdv1.AutoForwarding = True
DateTimePickerAdv1.NullModeKeyReset = Syncfusion.Windows.Forms.Tools.NullModeKeyReset.NumericKeys
DateTimePickerAdv1.Value = Now.Date
DateTimePickerAdv1.ResetSelectionOnFocus = True
Issue is resolved after using the event
Private Sub SfDateTimeEdit1_DateTimeValidating(sender As SfDateTimeEdit, e As ValidatingEventArgs) Handles SfDateTimeEdit1.DateTimeValidating
If e.IsError Then
e.Cancel = True
End If
End Sub
But i want to get if date entered is valid or not in code also.....Which property we can use to check that date is valid or not.... Or control showing any error or not..
also requreid NullModeKeyReset , How to change date if date is null... using keyboard....
You can validate the Date by using the DateTimeValidating event. Please use e.IsError (in DateTimeValidating event) to determine whether the input is valid or not.