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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Disable text field on DatePicker

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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 06:32 AM UTC

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.

Warning Icon 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.Close Icon

;