We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Disable text field on DatePicker

Thread ID:

Created:

Updated:

Platform:

Replies:

133067 Oct 6,2017 06:50 PM Oct 9,2017 02:32 AM ASP.NET Web Forms 1
loading
Tags: DatePicker
Andrew Jang
Asked On October 6, 2017 06:50 PM

Hello,

I have a datepicker on my ASP.NET webform as following

<ej:DatePicker runat="server" ID="DOB" Visible="true"  WatermarkText="DD-MMM-YYYY" MinDate="01/01/1900" DateFormat="dd-MMM-yyyy" ValidateRequestMode="Enabled" Width="100%" OnSelect="DateOfBirthChanged" StartLevel="Decade" ShowRoundedCorner="true"></ej:DatePicker>

which Renders like this



Now, I would like to disable textbox so that the users can only enter date through datepicker popup calendar view.

How can I make this happen?

Thank you,

Andrew

Prem Kumar Madhan Raj [Syncfusion]
Replied On October 9, 2017 02:32 AM

Hi Andrew,   
   
Thanks for contacting Syncfusion Support.   
   
We have checked with your query to disable date picker text field and allow to enter date value of date picker only with date picker calendar. This can be achieved by setting “false” to AllowEdit API of Date Picker as shown in the below code snippet.   
   
<ej:DatePicker runat="server" ID="DOB" Visible="true"  WatermarkText="DD-MMM-YYYY"MinDate="01/01/1900" DateFormat="dd-MMM-yyyy" ValidateRequestMode="Enabled" Width="100%"onSelect="DateOfBirthChanged" StartLevel="Decade" ShowRoundedCorner="true"AllowEdit="false"></ej:DatePicker>   
  
   
   
To know about available Date Picker properties, please refer the below links.   
   
   
Regards,   
Prem Kumar. M   


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;