javascript - The disabled value will change after easyui's datebox is modified. How to solve it?
漂亮男人
漂亮男人 2017-06-28 09:27:20
0
1
728

Configuration is as follows

$ctl.datebox({
    formatter : function(date) {
        var y = date.getFullYear();
        var m = date.getMonth() + 1;
        var d = date.getDate();
        return y + '-' + m + '-' + d;
        },
    parser : function(s) {
    var t = Date.parse(s.replace(/-/g, "/"));
    if (!isNaN(t)) {
        return new Date(t);
    } else {
        return new Date();
    }
}

Modify, save and execute $ctl.datebox('setValue', 'xxxx');
Execute after modification$('#billdate').datebox({disabled : false} );and$('#billdate').datebox({disabled : true});The value will be changed back to the value before modification
How to solve this problem

漂亮男人
漂亮男人

reply all(1)
为情所困

Solved, can be solved by using combo's readonly method.

$ctl.combo('readonly', false);
$ctl.combo('readonly', true);
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template