uxsolutions / bootstrap-datepicker

A datepicker for twitter bootstrap (@twbs)
Apache License 2.0
12.67k stars 6.06k forks source link

ui not having consistent behavious for invalid dates #2709

Open sant527 opened 2 months ago

sant527 commented 2 months ago

Expected behaviour

keeping the UI consistent with invalid dates

Actual behaviour

If i enter a date 01/01/1965 the ui will show the currentday screen only because its less than startDate also 10/1/10000 the ui willshow currentday screen only because greater than endDate

but if i enter a date like 99/99/2000 in the ui it picks 06/07/2000 the input does not change remains as 99/99/2000 because of forceParse = False. i dont want ui to show some approximate date for invalid dates. I want it to be consistent the same way if the date is not in the range of startdate and enddate

Datepicker version used

1.10.0

Example code

    $('.dt_picker').datepicker({
        autoclose: true,
        orientation: "auto",
        forceParse: false,
        format: 'mm/dd/yyyy',
        startDate: '01/01/1970',
        endDate: '12/31/9999',
        todayHighlight: true,
        weekStart: 1,
        clearBtn: true,
        validateOnBlur: true
    })