c# - DatePicker display null value -


is there way display null date value in windows store app datepicker control? following converter doesn't work:-

 <datepicker   date="{binding machine.basicstartdatetime,mode=twoway,converter={staticresource datetimetodatetimeoffsetconverter}}"/>   public object convert(object value, type targettype, object parameter, string language)         {             try             {                 if (value!=null && value.tostring() !="")                 {                     datetime date = datetime.parse(value.tostring());                     return new datetimeoffset(date);                 }                 datetimeoffset? dt=null;                 return dt;             }             catch (exception ex)             {                 datetimeoffset? dt = null;                 return dt;             }         } 

the 'basicstartdatetime' string type property , works fine when value not null (valid date). in case, value null control shows today's date.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -