Hi all,

I'm adding a UIDatePicker onto a view using IB and calling it dpDate (by adding 
an outlet).

The following code then consistently shows a date which is one day earlier than 
the date selected on screen:

              UIAlertView ua = new UIAlertView("Selected Date", 
dpDate.Date.ToString(), null,"Cancel", null);
              ua.Show ();

I've tried setting the time zone in advance, and I've also tried this:

              DateTime dt = DateTime.SpecifyKind (dpDeliveryDate.Date, 
DateTimeKind.Local);
              UIAlertView ua = new UIAlertView("Selected Date", 
dt.ToShortDateString(), null,"Cancel", null);

Both still give me a date which is one day earlier than the date selected. I 
have the UIDateTimePicker in Date mode, so that the time is not visible.

Anyone got any ideas?

Thanks
Alec

This message was scanned at Wednesday, January 18, 2012 2:47:50 AM GMT by Trend 
Micro IMHS on behalf of
White Clarke Group - www.whiteclarkegroup.com.

White Clarke Group Ltd - Registered in England - Registered number 03435619.
Registered address: Fairfax House, 15 Fulwood Place, London, WC1V 6AY 
_______________________________________________
MonoTouch mailing list
MonoTouch@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to