<telerik:RadDatePicker ID="RadDateEffectiveDate" runat="server"Culture="English (United States)" MinDate="<%# DateTime.Today.Date %>"></telerik:RadDatePicker>but didn't work, any suggestions??
I actually ended setting the mindate in the code behind but I thought that I could do it this way
RadDateEffectiveDate.MinDate = DateTime.Today5 Answers, 1 is accepted
Try the following.
ASPX:
<telerik:RadDatePicker ID="RadDateEffectiveDate" runat="server" Culture="English (United States)" MinDate="<%# DateTime.Today.Date %>"></telerik:RadDatePicker>When using a databinding expression such as
<%# DateTime.Today.Date %>, then you have to call Page.DataBind() (or ltrDate.DataBind() if that's the only databound control) from your code-behind (e.g. in Page_Load).C#:
protected void Page_Load(object sender, EventArgs e) { Page.DataBind(); }Thanks,
Princy.
Hi Princy,
I am trying to set the mindate and DateInput-MinDate property of the raddatepicker.
<telerik:RadDateTimePicker ID="StartInput" DateInput-MinDate="<%# DateTime.Today.Date %>" SelectedDate='<%# Bind("Start") %>' runat="server">
<Calendar ShowRowHeaders="false" runat="server"></Calendar>
</telerik:RadDateTimePicker>
But, Not getting ..any other idea??
Thanks,
Shubhangi
Called this also but not getting result
protected void Page_Load(object sender, EventArgs e)
{
Page.DataBind();
}
Thanks,
Shubhangi
Hi princy,
This code is working fine for date picker..
<telerik:RadDateTimePicker ID="StartInput" SelectedDate='<%# Bind("Start") %>' runat="server">
<Calendar ShowRowHeaders="false" RangeMinDate="<%# DateTime.Now %>" runat="server"></Calendar>
</telerik:RadDateTimePicker>
After, I want the same for Time picker..do you have any idea..
Thanks,
Shubhangi
It works..
<telerik:RadDateTimePicker ID="StartInput" SelectedDate='<%# Bind("Start") %>' runat="server">
<Calendar ShowRowHeaders="false" RangeMinDate="<%# DateTime.Now %>" runat="server"></Calendar>
</telerik:RadDateTimePicker>
Thanks,
Shubhangi