开发者

JQuery datepicker defaultdate from another datepicker

开发者 https://www.devze.com 2023-01-01 08:50 出处:网络
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 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

精彩评论

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