|
| 2nd Attempt: Null Dates in DateTimePicker Control |
|
|
|
|
| Messages |
|
Related Types |
This message was discovered on microsoft.public.dotnet.framework.compactframework.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
| Bruce Vander Werf |
I am looking for a DateTimePicker control that handles null dates. This is needed in the case where a date has not yet been specified (e.g. in a database) and you want to indicate and maintain that state.
Is it possible to specify a null date in the DateTimePicker control written by Ralph Arvesen from smartdevices.microsoftdev.com site?
If this is not possible, is there a similar control that will allow this functionality?
Thanks...
--Bruce
|
|
|
| |
|
| |
| |
| Mark Johnson |
I use the DateTimePicker.cs offered on a Microsoft site for Compact and Internationalised it to support First Day of Week and Date Formating accourding to culture. This as been testest on the Emulator for all supported Cultures (even Swahli). The Name of the Day of Week and Month are recieved from the Maschine but what the first Day of Week is and "Today" is must be manuly set.
As to a null Date, the Control must recieve a valid DateTime value as indeed the DataBase needs. For this I used 01.01.1900 as a start Date to show that the User does not want to set the Date (i.e. Treatment begin, when there is none).
I found no other workaround. Sorry.
Mark Johnson, Berlin Germany Click here to reveal e-mail address
"Bruce Vander Werf" <Click here to reveal e-mail address> schrieb im Newsbeitrag news:Click here to reveal e-mail address... [Original message clipped]
|
|
|
| |
|
| |
|
| |
| Jared Miniman [MVP] (VIP) |
Are you somehow binding the DateTimePicker to a DataSet? Otherwise, I see no reason why you couldn't set the control to DateTime.Min and then either handle the logic to set this to null in your database or store it as DateTime.Min, realizing this is a null entry?
-- _________________________________ Jared Miniman, MS-MVP Mobile Devices Mobile Computer Consultant
ActiveSync problems? http://www.microsoft.com/mobile/pocketpc/support/help/activesync.asp Connection Mngr Q's? http://www.microsoft.com/mobile/pocketpc/tutorials/connectionmanager
"Bruce Vander Werf" <Click here to reveal e-mail address> wrote in message news:Click here to reveal e-mail address... [Original message clipped]
|
|
|
| |
|
|
| |
| |
| Bruce Vander Werf |
Not binding to a DataSet, but I am setting the value of the control to a value in a DataSet.
I am doing as you suggest, however, the control does display the minimum date. I would like the date to display empty when there is a null or unspecified date.
--Bruce
On Fri, 12 Dec 2003 16:12:57 -0500, "Jared Miniman [MVP]" <Click here to reveal e-mail address> wrote:
[Original message clipped]
|
|
|
| |
|
| |
| |
| khorad |
"Bruce Vander Werf" <Click here to reveal e-mail address> wrote in message news:Click here to reveal e-mail address... [Original message clipped]
well i have a textbox and if there is a null date the value is blank
then if the user clicks it the date picker pops up with the default value (current date)
currently once the picker pops there is no way to return without selecting a date, but i suppose you could extend the control to include a cancel and/or clear button
in which case the popup would return an empty string to the textbox and you preserve your null date
(just to be clear, i don't use the DateTimePicker class, only the DayPickerPopup class)
|
|
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
BootFX
Reliable and powerful .NET application framework. |
|
|
|
|
|
|