acidb / mobiscroll

Cross platform UI controls for progressive web and hybrid apps (plain JS, jQuery, Angular and React)
https://mobiscroll.com
Other
1.54k stars 439 forks source link

jQuery Calendar undefined instance #457

Closed Ti-zz-viT closed 5 years ago

Ti-zz-viT commented 5 years ago

Lib version used 3.2.0

$(this).mobiscroll().calendar({
    theme: 'ios',
    lang: lang,
    display: 'bottom',
    dateFormat: 'dd.mm.yy',
    min: min,
    max: max,
    onBeforeShow: function(event, inst) {
        $(".elem").blur();
    },
    onDayChange: function(event, inst) {
        inst.setVal(event.date, true)
    },
    onBeforeClose: function (event, inst) {
        if (!inst.getVal() && event.button == 'set') {
            return false;
        }
    },
    defaultValue: defaultValue,
});

Logged error: StackTrace: TypeError: null is not an object (evaluating ‘inst.getVal’); Plattform: iOS; Device: iPhone10,4; OS version: 11.4.1;

P.S checked lib change log(3.2.X and 4.X) an didn’t found relevant fixes

dioslaska commented 5 years ago

Could not reproduce this.

More details here: https://forum.mobiscroll.com/t/calendar-undefined-instance/250/6