This is a migrated thread and some comments may be shown as answers.

Set Datepicker from SQL database

2 Answers 235 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Dale
Top achievements
Rank 1
Dale asked on 08 Dec 2015, 02:59 PM

Hi, I am using RadDatePicker as follows:

 

<telerik:RadDatePicker ID="RadDATERECIEVED" runat="server" Culture="English (United States)" >
<DateInput runat="server" DateFormat="MM/dd/yyyy" MaxLength="10">

 

The picker works fine, you can pick the date, it formats with a maximum length.

I have two questions:

1.  How do I set the DatePicker field so that the user cannot enter a date, it has to be chosen from the calendar.

2.  I will be loading some records with an existing date from SQL that needs to be loaded into the DatePicker.   What property do I use as I see no value property.

 

Thank you for your time.  Dale,

2 Answers, 1 is accepted

Sort by
0
Accepted
Eyup
Telerik team
answered on 11 Dec 2015, 01:06 PM
Hello Dale,

Straight to the points:

1. You can use the following property to achieve this requirement:
<DateInput ... ReadOnly="true">

2. You can use the DbSelectedDate property similar to this live sample:
http://demos.telerik.com/aspnet-ajax/grid/examples/data-editing/form-template-update/defaultcs.aspx

I hope this will prove helpful.

Regards,
Eyup
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Dale
Top achievements
Rank 1
answered on 16 Dec 2015, 08:56 PM
Thank you very much, it is now working.
Tags
DatePicker
Asked by
Dale
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Dale
Top achievements
Rank 1
Share this question
or