We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

keyboard entry for DateTimePickerAdv

Thread ID:

Created:

Updated:

Platform:

Replies:

35934 Oct 14,2005 11:21 AM UTC Dec 8,2005 09:21 AM UTC Windows Forms 6
loading
Tags: Tools
Mick Speake
Asked On October 14, 2005 11:21 AM UTC

Is there a way for the DateTimePickerAdv control to accept keyboard entry? I want the user to be able to enter dates in free format (e.g. 1may05 or 010505 etc)which the application will then validate. I can do this with the GridDataBoundGrid by setting the CellType to "MonthCalendar", CellvalueType=typeof(System.DateTime), Format="d" and capturing the CurrentCellValidating event. Unless the user can type a date unhindered by the control, it is useless. I currently have to use an ordinary TextBox. If this cannot be done with the existing product, could this be added as a feature request? Regards, Mick Speake

Anupama Roy [Syncfusion]
Replied On October 18, 2005 07:20 AM UTC

Hi Mick, In DateTimePickerAdv, we can enter dates in Custom Format through the keyboard. To implement this, do the following: 1.Set NullModeKeyReset property to Any. 2.Set the Custom Format property as per your requirement. 3.Change Format to Custom. 4.Enable the None Button. During Run Time, Click on the NoneButton to clear the Text and enter the values through the keyboard. Please refer the attached sample which illustrates this and let me know if this meets your requirements. Best Regards, Anu

Forum35934_DTP.zip

Mick Speake
Replied On October 18, 2005 08:30 AM UTC

Hi Anu, Thanks for the reply. Unfortunately, I cannot get your sample to work. After clicking the NoneButton I can''t enter anything. I have, however, managed to achieve what I want by placing a TextBox over the DateTimePicker control. Not a perfect solution but at least it works. Regards, Mick

Anupama Roy [Syncfusion]
Replied On October 18, 2005 09:02 AM UTC

Hi Mick, When you click on the None Button,the control will show the Text as "No date is selected".After that try to enter some number through the keyboard(eg:Press 1).Did you mean that you cannot enter values in the sample I have attached or in your application this is not working? Thanks, Anu.

Mick Speake
Replied On October 18, 2005 09:47 AM UTC

Hi Anu, In your sample, after hitting the NoneButton & getting the "No date is selected" text, I can only change the year via the keyboard. I''m still on V3.0.1.0 - could this be an issue? Regards, Mick

Anthony Ortiz
Replied On December 5, 2005 04:04 PM UTC

Hello, I downloaded the sample and am having the same problem entering the year. I am a developer at Credit Suisse First Boston and I would love to use your controls but am unable to get them to work to my clients'' satisfaction. There are two things I need on the calendar control : 1) Right alignment of date text. I can''t for the life of me get the date to right-align. All the other controls on the form are right-aligned except this one, and it sticks out like a sore thumb. 2) My date-time controls need to be entered and displayed in short-date format (e.g. 10/04/1973) and after your above suggestions I am now able to enter in the month and day using the keyboard but I am still unable to set the year using the keyboard (if the year in the control is set to 1900 and I type in 2004, it will change it to 1902, then 1900, then 1900, then 1904). Arrow keys are simply not an option for my users. What do I need to do? Thank you! Anthony

Anupama Roy [Syncfusion]
Replied On December 8, 2005 09:21 AM UTC

Hi Anthony, My apologies for the delayed response. Inorder to get the Date Right Aligned,You can make use of the RightToLeft property of DateTimePickerAdv as shown below. this.dateTimePickerAdv2.RightToLeft =RightToLeft.Yes ; In version 3.3.0.0, we had a bug that prevents the year field to accept values correctly.However ,this issue is resolved internally and the fix will be available in our next release 4.0. Please take a look at the sample attached and let me know whether you need more assistance. Thanks for your interest in Syncfusion products. Best Regards, Anu.

Forum35934_DTP_modified.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;