我怎样才能让CalendarExtender起始日期属性取当前日期? [英] How can I make CalendarExtender StartDate attribute take the current date?
本文介绍了我怎样才能让CalendarExtender起始日期属性取当前日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我觉得这样的事情
<ajaxToolkit:CalendarExtender ID="TextBox1_CalendarExtender" runat="server"
TargetControlID="txtDatumPoaganje" Format="MM/dd/yyyy" StartDate=<%=DateTime.Now%>>
但它不工作。我可以用JavaScript和警报消息类似:
But it doesnt work. I can make something similar with JavaScript and alert message:
<一个href=\"http://stackoverflow.com/questions/5608062/how-to-disable-$p$pvious-dates-in-calendarextender-control-through-its-render-eve\">how通过渲染事件CalendarExtender控制禁用previous日期?
但它是不一样的。
推荐答案
尝试,而不是起始日期SelectedDate。
Try SelectedDate instead of StartDate.
此外,下面的链接说,你不能从HTML侧设置selecteddate,而必须从code-背后做。
Also, the link below says you can't set selecteddate from the html side, instead you must do it from code-behind.
我还没有不过证实了这一点。
http://forums.asp.net/t/1293771.aspx/1
I haven't confirm this however. http://forums.asp.net/t/1293771.aspx/1
这篇关于我怎样才能让CalendarExtender起始日期属性取当前日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文