Hi Tom,
We are glad to know that you could resolve the issue with this.
Thanks for the update.
Regards,
Anu.
>I am coding VB but I used your idea and it works like a champ! Exactly what I wanted.
Thanks
>Hi Tom,
Currently it is not possible to create one particular key directly as the hotkey since NullModeKeyReset property that toggles the null state supports only three enums ArrowKeys,NumericKeys and Any .We have already logged a feature report regarding this and soon we will be implementing this feature for DateTimePickerAdv so that one particular key can also be specified as NullModeKeyReset.As a workaround,you can derive a custom class from DateTimePickerAdv and set in such a way that only for that specified keyData,the null date will change to present date.
public class DateTimePickerAdvance:Syncfusion.Windows.Forms.Tools.DateTimePickerAdv
{
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if(this.IsNullDate &&keyData==Keys.Enter )
{
this.Value =System.DateTime.Today ;
}
return false;
}
Please take a look at the sample attached and let us know if you have any difficulties.
Thanks for choosing Syncfusion products.
Regards,
Anu.
DateTime0.zip