简体   繁体   中英

framework 7 get value of range date picker

i trigger range date picker from a button , let say i have

how to set value the selected range date to my

, thank you in advance

var date=new Date();
var tgl=date.getDate();
var bln=date.getMonth();
var thn=date.getFullYear();
var calendarRange = myApp.calendar({
    input: '#calendar-range',
    dateFormat: 'M dd yyyy',
    rangePicker: true,
    onClose:function(){

        $$("#selected-date").removeClass("hidden");
        // $$("#selected-date").val(calendarRange.value);
        alert(calendarRange.value);

    },
    disabled:{
        to: new Date(thn, bln, (tgl-1))
    }

});

Try this:

onChange: function(p,values,displayValues){
             var start= new Date(values[0]);
             var end = new Date(values[1]); 
}
function onclickCash() {
    var myPicker = $('#calendar-range').val();
    console.log(myPicker);
}

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