简体   繁体   中英

Kendo ui MVC datepicker

Kendo ui in MVC application automatic add script for datetime values. I`m use jquery ui datepicker but kendoui add script

jQuery(function () {
    jQuery("#DateRoj").kendoDateTimePicker({
        "format": "dd.MM.yyyy H:mm",
        "min": new Date(1900, 0, 1, 0, 0, 0, 0),
        "max": new Date(2099, 11, 31, 0, 0, 0, 0),
        "interval": 30
    });
});

and i have problem with this editor. How i can disable auto adding scripts by Kendo?

The Kendo UI API documents are pretty straight forward on this. If your question actually is about how to initialize it, try losing the quotes on the key names ("min", "max" etc.).

A running sample would be:

$(document).ready(function() {

    $("#DateRoj").kendoDatePicker({
        min: new Date(2011, 0, 1),
        max: new Date(1900, 0, 1),
        format: "yyyy/MM/dd"
    });
});

Also note that the interval doesn't exist in the kendo.ui.DatePicker namespace . So you probably should remove that.

What I can't really make out of your question is if you want to use this mixed with a jQuery datepicker. At least, I'm assuming that's where the interval comes from? If so, that's a combination that will probably not work.

Last, if you really want to "disable automatically adding kendo scripts" you will not be able to use the kendoDatePicker.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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