This is a migrated thread and some comments may be shown as answers.

[Solved] DateTimePickerFor Losing Milliseconds

0 Answers 15 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
PierLuc
Top achievements
Rank 1
PierLuc asked on 26 Sep 2011, 07:37 PM
Hi,

I am using a read only DateTimePickerFor in my view mapped to a DateTime object of my strongly type model.
My controller retrieves the model as a parameter of an HttpPost action method.

At first my DateTime object has Milliseconds in it, I display it as a read-only in my view, and in the post back the milliseconds as disappear.

I believe it comes from an internal ToString() for the remapping into the returned model. Is there a way to insure that the milliseconds will follow through the post back?

Thanks
Tags
Date/Time Pickers
Asked by
PierLuc
Top achievements
Rank 1
Share this question
or