Topic: Calendar format [SOLVED]

i an using glDatePicker https://github.com/glad/glDatePicker
but i cant get the date to format (yyyy-mm-dd)


When ever i change this a bit my calendar stops working at all

// Date picker
    $('.datepicker').glDatePicker(
    { zIndex: 100}
    );

Last edited by moiseszaragoza (2012-06-26 10:14:19)

Re: Calendar format [SOLVED]

try this

// Date picker
    $('.datepicker').glDatePicker(
    {
        onChange: function(target, newDate)
        {
            target.val
            (
                newDate.getFullYear() + "-" +
                (newDate.getMonth() + 1) + "-" +
                newDate.getDate()
            );
        }
    });