简体   繁体   English

如何为@(Html.Kendo().DatePicker() 附加模糊事件?

[英]How to attach a blur event for @(Html.Kendo().DatePicker()?

i have a datepicker and i want to get the value if the user modify the datepicker manually without exit the datepicker.我有一个日期选择器,如果用户在不退出日期选择器的情况下手动修改日期选择器,我想获取该值。 Thanks谢谢

So do you want the value whenever someone changes the value or the value that is posted by the user in the end?那么你是想要值什么时候有人改动值还是用户最后贴出来的值?

if not you could do something like:如果没有,您可以执行以下操作:

 function onDatePickerChange() {
            var DateVal = $(".classofdatepicker").val();
        }

If you want to post this to the page you should:如果您想将此发布到页面上,您应该:

  function checkMaySend() {
  var url = "/MyVeryOwn/UrlIPostTo";
  var DateVal = $(".classofdatepicker").val();
   var data = {  DatePickerValue: DateVal};
  }

  var jqxhr = $.post(url, data, function () {
  //Do something on post here if needed
  })

这是我的 Telerik comosant <td>@(Html.Kendo().DatePickerFor(model => model.DateRecherche).Max(DateTime.Today).Events(e => e.Change("LancerRecherche")))</td>如果用户在不退出组合的情况下输入日期,我希望在我提交时获取输入的值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM