|
Rank: Newbie Groups: Member
Joined: 5/11/2010 Posts: 2
|
Hi,
I want to allow the user to be able to 'delete' the date in the datepicker, essentially selecting a null date. Currently, when the form is posted back the value resets to the previous value that was entered.
Is there any way of fixing this?
Rich
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Can you let us know what version are you running? We are not aware of any such issues. You may also want to try a DatePicker and a button inside a blank page to see whether it has anything to do with other code in your page.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 5/11/2010 Posts: 2
|
Hi,
I am using version 3.
Here is the code i am using (there is nothing in the code behind)
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Calendar.aspx.cs" Inherits="Calendar" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <eo:DatePicker ID="dtp" runat="server"></eo:DatePicker> <asp:Button id="btn" runat="server" /> </div> </form> </body> </html>
Thanks, Rich
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Ah. That's a very old version that we stopped supporting a long time ago. You may want to try the latest version and see if it works for you. This might be something we fixed along the way but we are not aware of such issues in the current version.
Note that each version requires a different license, so you may need to purchase a new license for the current version if you do decide to switch. If you wish to stay in your version, you may want to add some onsubmit script that calls the DatePicker's getSelectedDate function and check whether it is null. If it is null, you can then set a flag in a hidden field and pass this flag back to your server. Inside your server code you would then check this flag and if it is set, then set the DatePicker's SelectedDate to DateTime.MinValue.
Thanks!
|
|