atatanasov / gijgo

Gijgo - Free Javascript Controls
http://gijgo.com
MIT License
476 stars 188 forks source link

date check not working #484

Open HugoHiasl opened 5 years ago

HugoHiasl commented 5 years ago

Hello,

I try to use the datepicker in a web ui.

this is my set up in onready:

    <script type="text/javascript">
        var today = new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate());

           $('#startdate').datepicker({
                uiLibrary: 'bootstrap',
                minDate: today,
                maxDate: function () {
                    return $('#enddate').val();
                }
            });

            $('#enddate').datepicker({
                uiLibrary: 'bootstrap',
                minDate: function () {
                    return $('#startdate').val();
                }
            });
... other configs here

for the input fields I use normal text input fields with a class of "form-control" (bootstrap 3)

The datepickers are working as expected when using the mouse. But I am able to enter dates before today for start date when I enter it by keyboard.

I tried it in the "Date Range Picker" example on the Gijgo site. There it first did reset it to today on first trial but in subsequent trials it ignored it and did allow dates before today.

I saw #228. My browser is chrome: "Version 71.0.3578.98 (Offizieller Build) (64-Bit)"

atatanasov commented 5 years ago

Thanks for reporting this issue. We are going to fix that in the next release.