Javascript month range picker

后端 未结 2 1676
后悔当初
后悔当初 2020-12-19 09:43

can anyone suggest me a good javascript month range picker with min and max date functionality.

I have googled it and not able to find a good one. I have seen a JQue

2条回答
  •  没有蜡笔的小新
    2020-12-19 10:34

    I suggest DateRangePicker, a lightweight month range picker which is very easy to customize

    Usecase

    $('input').rangePicker({ minDate:[2,2009], maxDate:[10,2013] })
        // subscribe to the "done" event after a date was selected
        .on('datePicker.done', function(e, result){
            console.log(result);
        });
    

    Available Settings:

    {
        RTL : false,
        closeOnSelect : true,
        presets : [{
                buttonText  : '1 month',
                displayText : 'one month',
                value       : '1m'
            },{
                buttonText  : '3 months',
                displayText : 'three months',
                value       : '3m'
            },{
                buttonText  : '6 months',
                displayText : 'six months',
                value       : '6m'
            },{
                buttonText  : '12 months',
                displayText : 'twelve months',
                value       : '12m'
        }],
        months  : ['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'],
        minDate : [5,2006],
        maxDate : [8,2013],
        setDate : null
    }
    

提交回复
热议问题