WhatSock / apex

Apex 4X: The Comprehensive ARIA Development Suite
MIT License
29 stars 9 forks source link

Undefined put into input when entering a date picker date #58

Closed lukos closed 4 weeks ago

lukos commented 4 weeks ago

I have included 4X.js, Button.js and DatePicker.js from the standard folder. I have then attached a date picker to each of my date inputs on the page like this:

$(function () {
    $('input.datebox').each(function (index, elem) {
        $A.setDatepicker({
            toggle: $(this).siblings(".date-calendar")[0],
            input: this,
            inputDateFormat: $(this).attr('placeholder')
        });
    });
});

The button works to display the date picker but if I pick a date, the following is put into the input: "09/05/undefinedundefined" and I am unsure why that is. The inputDateFormat is taken from the placeholder of the input and is either MM/DD/YYYY or DD/MM/YYYY which looks correct to the documentation.

Am I doing something wrong? Thanks

accdc commented 4 weeks ago

Hi, thanks for filing this, I didn't realize that a recent feature update accidentally broke this. I restored the prior datepicker.js version so now your code should work as expected. Please don't forget to add the toggle as well which is important for touch device users.

lukos commented 3 weeks ago

Thank you! I thought I was going mad ;-)