Date Time Picker null instance

Nov 22, 2012 at 1:45 PM


I'm using White on WPF project. I've tried to use to an instance of DateTimePicker but it is always null. This is my code:

DateTimePicker startDatePicker = createProjectWindow.Get<DateTimePicker>("StartDatePicker");

Assert.AreEqual(DateTime.Today, startDatePicker.Date);




Nov 22, 2012 at 5:43 PM
We have found similar issue in white. Try using code similar to

var startDatePicker = createProjectWindow.Get("StartDatePicker") as DateTimePicker;

this have "fixed" our problem.
Nov 23, 2012 at 11:33 AM

Thanks for your response, but it doesn't work in my case. I forgot to mention that in the project the control type is DatePicker (not DateTimePicker), could this cause the problem? 

Nov 25, 2012 at 4:56 AM

Its hard to reply w/o access to your application..