javascript - 剑道日历选择日期事件

标签 javascript jquery calendar kendo-ui

您好,我的页面中有一个剑道日历和一个文本框。当我在日历上选择任何日期时,我想在我的文本框中显示该值。 (如日期时间选择器)。有什么办法可以得到吗?

这是我的示例代码

<div id="calendar"></div>
<input type="text" name="txtdate" id="txtdate"/>

 <script>
                $(document).ready(function() {
                    // create Calendar from div HTML element
                    $("#calendar").kendoCalendar();
                });

                var cal = $("#calendar").data("kendoCalendar");

                cal.bind("change", function () {
                    // Here I wanted to bind the selected value to my text box (txtdate).                      
                });
  </script>

最佳答案

   var textVal =  $(this).value();
   $('#txtdate').val(textVal);

关于javascript - 剑道日历选择日期事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17519284/

相关文章:

jQuery ajax 数据两个变量

WPF用户控件: can I bind properties from an internal and an external datacontext?

date - 第二天使用日历 JSF primefaces 检查

javascript - Object.height 返回半高

jquery - MVC 4 BundleConfig 不创建脚本引用

javascript - 使用您的http请求逐步自动路由有时间滞后

javascript - jQuery .css 主体不透明度

Java 日历 - 设置自定义日期和时间

javascript - Node Express Res 发送文件

javascript - 圆形按钮的制作方法