Meteor-Community-Packages / meteor-autoform-bs-datepicker

Custom "bootstrap-datepicker" input type for AutoForm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

$.datepicker[(("_" + options) + "Datepicker")] is undefined

nanu-c opened this issue · comments

commented

I use the datepicker multiple times and it seems like its only working the first time i am on my site and its happening when i try to submit a form.

TypeError: $.datepicker[(("_" + options) + "Datepicker")] is undefined

my schema looks like

    date: {
        type: String,
        label: "When did it happen?",
        index: 7,
        optional: false,
        autoform: {
            afFieldInput: {
                type: "bootstrap-datepicker",
                datePickerOptions: function () {
                    return {
                      autoclose: true
                    }

                }
            }
        }
    },

and my autoform-part

 {{> afFormGroup name="date" type="bootstrap-datepicker" }}

the whole code is in my desaparecidos-repro here.
Would be nice to get some hint.

datetimepicker error
(Also the glyphons aren't working, but thats another case)

This works on my code:

Date: {
label: function() {
return(TAPi18n.__('Date'));
},
type: Date,
autoform: {
afFieldInput: {
type: "bootstrap-datepicker",
datePickerOptions: {
autoclose: true,
language: 'es'
}
}
}
}

I guess the difference is that I don't use function as a way to add the options.