Open
Description
First: Thanks for this really cool and easy to use framework!
I would like to use a input field of type 'date' to support browser specific date picker implementations, but it always shows the error 'Invalid type, expected date' and i do not know where this comes from. If I insert an date input field manually and bind it with ng-model
to a date object, it seems no problem.
I use the following schema
{
type: "object",
properties: {
birthday: {
type: "date"
}
}
}
form
[
"*"
]
and configure the schemaFormProvider
like this:
angular.module('schemaForm').config(['schemaFormProvider', 'schemaFormDecoratorsProvider', 'sfPathProvider',
function (schemaFormProvider, schemaFormDecoratorsProvider, sfPathProvider) {
var datepicker = function (name, schema, options) {
if (schema.type === 'date') {
var f = schemaFormProvider.stdFormObj(name, schema, options);
f.key = options.path;
f.type = 'date';
options.lookup[sfPathProvider.stringify(options.path)] = f;
return f;
}
};
schemaFormProvider.defaults.date = [];
schemaFormProvider.defaults.date.unshift(datepicker);
}
]);
Could you tell me where I am going wrong?