开发者

JQuery datepicker defaultdate from another datepicker

I have several jquery datepickers on my asp page and I want to set the defaultdate of date picker to be the same as the previous datepicker.

I am currently using

defaultDate: document.getElementById('<%=txtFirst开发者_运维知识库Date.ClientID%>').value

This works okay, but obviously errors if firstDate is null. Should I be using OnSelect function instead?

Appreciate any help


var defaultDate = document.getElementById('<%=txtFirstDate.ClientID%>').value;

defaultDate: defaultDate || 'default-value'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜