Hi
We are using the below code for autoselect next part for the . this condition is working good. but we need to stop the selection, once the year is entry is done. please find the below Image. kindly help me to solve this
Thanks in advance
Public Sub Datetimetype(DName As RadDateTimePicker)
Dim provider = TryCast(DName.DateTimePickerElement.TextBoxElement.Provider, MaskDateTimeProvider)
provider.AutoSelectNextPart = True
End Sub
We are using the below code for autoselect next part for the . this condition is working good. but we need to stop the selection, once the year is entry is done. please find the below Image. kindly help me to solve this
Thanks in advance
Public Sub Datetimetype(DName As RadDateTimePicker)
Dim provider = TryCast(DName.DateTimePickerElement.TextBoxElement.Provider, MaskDateTimeProvider)
provider.AutoSelectNextPart = True
End Sub
4 Answers, 1 is accepted
0
Hi Krish,
The image is missing, could you attach it again, please.
I am not sure what is the desired effect. Do you want to make the year read-only?
I am looking forward to your reply.
Regards,
Dimitar
Progress Telerik
The image is missing, could you attach it again, please.
I am not sure what is the desired effect. Do you want to make the year read-only?
I am looking forward to your reply.
Dimitar
Progress Telerik
Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Krish
Top achievements
Rank 1
answered on 22 Nov 2018, 01:28 PM
hi Dimitar,
I am very sorry for the inconvenience. I attach the image. For your reference, I attach the video also. Please find the image and video link. sorry once again.
Video Link: https://Mahaaitech.tinytake.com/sf/MzEwMjAzNl85Mjk4MjM4
0
Hi Krish,
You can use the SelectedItemChanged event of the MaskDateTimeProvider to select the next control. Here is the code:
Let me know how this works for you.
Regards,
Dimitar
Progress Telerik
You can use the SelectedItemChanged event of the MaskDateTimeProvider to select the next control. Here is the code:
Public Sub New() InitializeComponent() radDateTimePicker1.Format = DateTimePickerFormat.Custom radDateTimePicker1.CustomFormat = "dd/MM/yyyy" Dim dtprovider As MaskDateTimeProvider = TryCast(radDateTimePicker1.DateTimePickerElement.TextBoxElement.Provider, MaskDateTimeProvider) dtprovider.AutoSelectNextPart = True AddHandler dtprovider.SelectedItemChanged, AddressOf Dtprovider_SelectedItemChanged1End SubPrivate oldSelectedIndex As Integer = -1Private Sub Dtprovider_SelectedItemChanged1(ByVal sender As Object, ByVal e As EventArgs) Dim provider = TryCast(sender, MaskDateTimeProvider) If oldSelectedIndex <> -1 AndAlso oldSelectedIndex = 4 AndAlso provider.SelectedItemIndex = 0 Then radTextBox1.Focus() End If oldSelectedIndex = provider.SelectedItemIndexEnd SubLet me know how this works for you.
Regards,
Dimitar
Progress Telerik
Get quickly and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Krish
Top achievements
Rank 1
answered on 23 Nov 2018, 12:52 PM
Thank you so much, Dimitar. code was working good:)
