I am using the dojo dateTimePicker in my application. Now i want to limit its start date and end date on particular event e.g. If the selected period is current finacial year then i want change the startDate value of my dateTimePicker to 1st April 2010 & lastDate value to 31st mar开发者_如何学Pythonch 2011. And i want to do that on onchange/onblur event of dateTimepicker, please help me, Thanks in advance.
I don't know anything about struts but a dijit DateTextBox works something like this:
dojo.query("#dateTimePicker .dijitInputField input").connect("onblur"), function() {
dijit.byId('dateTimePicker').constraints.min = Date.Parse("1 Apr, 2010");
dijit.byId('dateTimePicker').constraints.max = Date.Parse("31 Mar, 2011");
});
Hopefully that'll get you on your way.
精彩评论