jQuery日期从一个文本框到另一个文本框 [英] jQuery date from one textbox to another textbox
本文介绍了jQuery日期从一个文本框到另一个文本框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法弄清楚如何将日期从一个文本框填充到另一个文本框
这是我的代码:
$(function(){
$(#newDepBirthDate)。datepicker();
$(#newDepBecameDep)。datepicker();
$(#newDepBirthDate)。focusout(function(){
$(#newDepBecameDep)。val($(#newDepBirthDate)。val());
}) ;
});
这不起作用,因为当离开文本框时,值不存在。
解决方案
(function(){
(#newDepBirthDate)。datepicker();
(# newDepBecameDep)日期选择器();
I can't figure out how to populate date from one textbox to another
This is my code:
$(function () { $("#newDepBirthDate").datepicker(); $("#newDepBecameDep").datepicker(); $("#newDepBirthDate").focusout(function(){ $("#newDepBecameDep").val($("#newDepBirthDate").val()); }); });
This does not work because when leaving a textbox the value is not there.
解决方案
(function () {
("#newDepBirthDate").datepicker();
("#newDepBecameDep").datepicker();
这篇关于jQuery日期从一个文本框到另一个文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文