<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Nullable DateTimePicker</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Nullable DateTimePicker</description>
  <pubDate>Mon, 27 Apr 2026 04:57:08 -700</pubDate>
  <lastBuildDate>Mon, 04 Jan 2010 12:39:03 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=502</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Nullable DateTimePicker : 1. Bind your datetimepicker.text,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=502&amp;PID=6013#6013</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=654" rel="nofollow">dr_kreso</a><br /><strong>Subject:</strong> 502<br /><strong>Posted:</strong> 04-Jan-2010 at 12:39pm<br /><br />1. Bind your datetimepicker.text, not datetimepicker.value<br>2. Add this code in datetimepicker_Validating(object sender, CancelEventArgs e) event:<br><br>if (!datetimepicker.Checked)<br>((Order)orderBindingSource.Current).OrderDate= null;<br><br>So, you need to manually set your Date to null value<br><br>3. ShowCheckBow of datetimepicker must be set to True<br><br>I hope it helps!]]>
   </description>
   <pubDate>Mon, 04 Jan 2010 12:39:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=502&amp;PID=6013#6013</guid>
  </item> 
  <item>
   <title>Nullable DateTimePicker : See the post I last referenced...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=502&amp;PID=1676#1676</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=20" rel="nofollow">Customer</a><br /><strong>Subject:</strong> 502<br /><strong>Posted:</strong> 17-Oct-2007 at 10:12am<br /><br />See the post I last referenced (about the custom blue textbox control) to see an example of how to build a custom binder.]]>
   </description>
   <pubDate>Wed, 17 Oct 2007 10:12:07 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=502&amp;PID=1676#1676</guid>
  </item> 
  <item>
   <title>Nullable DateTimePicker : Thanks for your quick reply.  Yes,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=502&amp;PID=1675#1675</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=28" rel="nofollow">Miszou</a><br /><strong>Subject:</strong> 502<br /><strong>Posted:</strong> 17-Oct-2007 at 9:05am<br /><br /><P>Thanks for your quick reply.</P><DIV></DIV><DIV>Yes, the reason for using a different nullable date-time picker is due to a customer requirement that no date should be displayed if no date has yet been entered. The .NET date-time picker (is this the same as the DevForce one?) will always display a date, even when the value is null.</DIV><DIV>&nbsp;</DIV><DIV>It&nbsp;has a strange checkbox implementation that is not intuitive at all - especially as null dates are displayed as todays date, but grayed out.</DIV><DIV>&nbsp;</DIV><DIV>So, what I would really like, is a datetime picker that allows users to type freehand&nbsp;dates, but also contains a drop down picker. I was hoping to be able to use the control that I mentioned in my initial post, but I don't think it's going to work...</DIV><DIV>&nbsp;</DIV><DIV>I think I am going to&nbsp;have to write my own control (using <a href="http://www.ideablade.com/forum/forum_posts.asp?TID=133" target="_blank">http://www.ideablade.com/forum/forum_posts.asp?TID=133</A>&nbsp;as a reference).</DIV><DIV>&nbsp;</DIV><DIV>As far as I can see, there are&nbsp;a couple of ways to go about this.&nbsp;I can either create an owner-drawn date-time picker, or I can roll my own, using a combination of a combo-box&nbsp;and a calendar control, which is the direction I am leaning towards at the moment. I can catch the dropdown/up events and display the calendar appropriately and users can also&nbsp;type free text into the combo (which would of course be parsed by&nbsp;a DateConverter).</DIV><DIV>&nbsp;</DIV><DIV>At some point, I will almost certainly need to host this control in a DataGridView as well, but I am assuming I can follow these instructions to&nbsp;implement that functionality: <a href="http://msdn2.microsoft.com/en-us/library/7tas5c80%28VS.80%29.aspx" target="_blank">http://msdn2.microsoft.com/en-us/library/7tas5c80(VS.80).aspx</A>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>You also mentioned that you could give me the&nbsp;DataBinder for the NullableDatePicker. If you could provide that, or even just an example of a custom DataBinder, I would be extremely grateful.</DIV><DIV>&nbsp;</DIV><DIV>Thanks again for your response, and if you think of any additional hints or pitfalls to avoid, please let me know!</DIV>]]>
   </description>
   <pubDate>Wed, 17 Oct 2007 09:05:09 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=502&amp;PID=1675#1675</guid>
  </item> 
  <item>
   <title>Nullable DateTimePicker : I am not entirely sure why you...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=502&amp;PID=1673#1673</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 502<br /><strong>Posted:</strong> 16-Oct-2007 at 7:50pm<br /><br /><P>I am not entirely sure why you don't want to use the DevForce Nullable Date Picker.&nbsp; I assume that you don't like the way it looks when the date is Null.</P><P>Here are some options:</P><P>(1)&nbsp;You might consider building a custom control based on the Nullable Date Picker.&nbsp; Look at a previous post and the reply at: <BR>&nbsp;<BR><a href="http://www.ideablade.com/forum/forum_posts.asp?TID=133" target="_blank">http://www.ideablade.com/forum/forum_posts.asp?TID=133</A> <BR>&nbsp;<BR>It shows you how to create a custom control (a textbox with a blue background).&nbsp; This custom TextBox will show up in the Designer and will be one of your choices for a TextBox control in your Autopopulate form.</P><P>I can give you the DataBinder for the NullableDataPicker.</P><P>(2)&nbsp;Use .NET databinding</P><P>You can use .NET databinding to bind to DevForce objects</P><span style="font-size:10px"><br /><br />Edited by davidklitzke - 16-Oct-2007 at 7:50pm</span>]]>
   </description>
   <pubDate>Tue, 16 Oct 2007 19:50:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=502&amp;PID=1673#1673</guid>
  </item> 
  <item>
   <title>Nullable DateTimePicker : I am trying to databinda nullable...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=502&amp;PID=1666#1666</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=28" rel="nofollow">Miszou</a><br /><strong>Subject:</strong> 502<br /><strong>Posted:</strong> 16-Oct-2007 at 11:05am<br /><br />I am trying to databind&nbsp;a nullable DateTime to the DateTimePicker in .NET.<DIV>&nbsp;</DIV><DIV>However, it does not appear to be working as I would expect - and I'm not sure if this is due to the 3rd party DateTimePicker controls I am using, or whether the DateConverter is somehow translating the data prior to display.</DIV><DIV>&nbsp;</DIV><DIV>I have tried several free controls that I have found on the internet, but none of them seem to work properly when binding to&nbsp;an EntityList&lt;T&gt;. I am particularly interested in using this one <a href="http://www.codeproject.com/cs/miscctrl/NullableDateTimePicker.asp" target="_blank">http://www.codeproject.com/cs/miscctrl/NullableDateTimePicker.asp</A>&nbsp;as I like the display when there is no date. (a prompt string instead of an unchecked checkbox and todays date).</DIV><DIV>&nbsp;</DIV><DIV>I realize that you probably aren't going to support this guys control (!), but I was wondering if you could perhaps point me in the right direction. I am wondering whether I have to create my own DataConverter to support null values? And if so, would you happen to have a DateConverter that supports null values just sort of lying around? <img src="http://www.ideablade.com/forum/smileys/smiley2.gif" height="17" width="17" border="0" align="absmiddle" alt="Wink" /></DIV><DIV>&nbsp;</DIV><DIV>Basically, do I need to write my own DevForce specific&nbsp;DateTimePicker and/or DateConverter to get it to work as I want?</DIV><DIV>&nbsp;</DIV><DIV>Thanks for your help.</DIV>]]>
   </description>
   <pubDate>Tue, 16 Oct 2007 11:05:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=502&amp;PID=1666#1666</guid>
  </item> 
 </channel>
</rss>