Welcome Guest Search | Active Topics | Sign In | Register

Disable previous dates in eo:Datepicker Options
ankur8007
Posted: Tuesday, June 3, 2008 4:29:07 AM
Rank: Newbie
Groups: Member

Joined: 6/3/2008
Posts: 4
hi all.

dont know if it has been asked earlier but
how can i disable all the previous dates in the eo:DatePicker?


Thanks
Ankur
eo_support
Posted: Tuesday, June 3, 2008 7:58:16 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,087
Hi,

You would set MinValidDate to DateTime.Today.

Thanks
ankur8007
Posted: Wednesday, June 4, 2008 7:51:59 AM
Rank: Newbie
Groups: Member

Joined: 6/3/2008
Posts: 4
Hi, thanks for the reply it solved my problem

Further, Is there is any way to make the textbox of the date picker "Readonly"
and which event can i use for client side functionality, i tired this event- "ClientSideOnSelect"

Thanks,
Ankur
eo_support
Posted: Wednesday, June 4, 2008 8:07:04 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,087
Hi,

This property is what you need:

http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.DatePicker.DisableTextBox.html

As for client side functionality, ClientSideOnSelect is only a small part of it. You will want to take a look of this topic to have some basic idea about how to use our client side JavaScript interface:

http://www.essentialobjects.com/ViewDoc.aspx?t=clientapi_howto.html

And client side Calendar control (it covers DatePicker as well):

http://www.essentialobjects.com/ViewDoc.aspx?t=JSDoc.Public.Calendar.html

All the documentation are also available on your local machine as a .chm file, which is much faster than the online version. Full source code for the sample project is also installed on your machine, so you may aslo want to take a look of those.

Thanks

ankur8007
Posted: Thursday, June 5, 2008 2:29:55 AM
Rank: Newbie
Groups: Member

Joined: 6/3/2008
Posts: 4
hi,

yes i did use "DisableTextbox" property but it hides the textbox completely when it loads, .. any other way which allows me to show the textbox with readonly property.

Thanks,
Ankur
eo_support
Posted: Thursday, June 5, 2008 7:42:35 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,087
Hi,

If you want both the textbox and drop down button disabled, you can set the DatePicker's Enabled to False. If you only want the textbox disabled, you would set DisableTextBox to True --- However it does replace the TextBox with a Label, which means you no longer see the textbox. If you still want to have the same look and feel as a textbox, you can edit the DatePicker's PickerStyle to include a border and background color, that should make it looks like a disabled textbox.

Thanks
ankur8007
Posted: Thursday, June 5, 2008 7:46:55 AM
Rank: Newbie
Groups: Member

Joined: 6/3/2008
Posts: 4
eo_support wrote:
Hi,

If you still want to have the same look and feel as a textbox, you can edit the DatePicker's PickerStyle to include a border and background color, that should make it looks like a disabled textbox.

Thanks


I am working on this part :) Thanks for the help.

Regards,
Ankur


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.