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. Image for the cookie policy date
close icon

DateTime Cell

Hello, I''m using the DateTimeCell cell type in order to edit time values in the grid. My problem is: I don''t want the control to check the validity of the date before the user validates the cell. For example: I am using the following date format: DD/MM/YY If the current date is 01/02/05, the user wants to enter 30/03/05. When he starts typing ''3'' then the control puts ''03'' for the days and switches to the month part of the control. If it''s not possible to do that, is there another control I can use instead? Thanks in advance, Sebastien

4 Replies

AD Administrator Syncfusion Team June 10, 2005 11:29 AM UTC

If you have our Tools library, I think you can use our DateTimePickerAdv in a cell to get this behavior. Here is a sample. http://www.syncfusion.com/support/user/uploads/datepickercell.zip That control lets you autoforward the keys which I think is what you are requesting. This above sample does not have these propertues set, but you can modify the code to set them by adding the constructor to the MyDateTimePicker class.
public MyDateTimePicker() : base()
{
	this.AutoForwarding = true;
	this.TabForwarding = true;
}


SE seb June 10, 2005 12:28 PM UTC

I am using the tools library and your DatePickerCell. It works fine except that I really need this feature : be able to type 31 in the part of the control that represents the days even if the selected month is february or a month with 30 days. My users want the following custom date format: "dd/MM/yy" so they type the value for the days before the one for the month. So in my previous example, if the current date is 01/02/05, the user wants to enter 30/03/05. When he starts typing ''''3'''' then the control puts ''''03'''' for the days and switches to the month part of the control (as autoforwarding is set to true). It is really paintful for the user because he has to change the month before changing the days :(


AD Administrator Syncfusion Team June 10, 2005 03:42 PM UTC

We will make it a feature request to handle this problem somehow (allow you to turn off validation until you leave the control maybe, or raise an event that will allow you to override the validation). Until we have a release with this implemented, the only way I would know to do this is to copy our source code for the DataTimePickerAdv into your own class, and tweak it to ignore validation when needed.


SE seb June 10, 2005 03:53 PM UTC

Thank you, Clay. Have a good week end.

Loader.
Live Chat Icon For mobile
Up arrow icon