Textalk / angular-schema-form-datepicker

Datepicker add-on for Angular Schema Form using pickadate!
MIT License
43 stars 57 forks source link

Datapicker ignores htmlClass completly #13

Closed orderofout closed 9 years ago

orderofout commented 9 years ago

It seems like the functionality from the angular-schema isn't completely passed through. The htmlClass is ignored by the datepicker form field when the html is generated. But the code for the adjacent field is created as expected.

Any advice to get this working quickly?

{
    'type': 'section',
    'htmlClass': 'row',
    'items': [
        {'key': 'recentExam', 'format': 'mm-dd-yyyy', 'htmlClass': 'col-sm-6'},
        {'key': 'examPurpose', 'htmlClass': 'col-sm-6'}
    ]
},

This is the resulting html: http://postimg.org/image/xprmfqz6r/

Dervisevic commented 9 years ago

Datepicker is separate from Angular-Schema-Form and was actually written prior to htmlClass being added to ASF, it does require the template to have functionality for it and that just hasn't been done. This should be added to the todo list, nothing i could do right now.

If you need a quick fix you can add it to your template, and a Pull request would be great. You can see how it's implemented for checkboxes here, look for form.htmlClass and form.fieldHtmlClass in there. It would need to be added to the template for the datepicker.

Hope that helps!

Dervisevic commented 9 years ago

Actually, i do have time right now, let me whip it up

orderofout commented 9 years ago

You are awesome! Thank you!

Dervisevic commented 9 years ago

Try out the 0.3.0 version and let me know if it works.

orderofout commented 9 years ago

Works for me. Thanks again!