forkcms/forkcms — pull request #888 by jessedobbelaere (2014-10-05 12:18:07+00:00)
Title: Date & time field support for Formbuilder

### Description
Added a datetime button to the Formbuilder module, to create a date or time input field inside your form (for simple reservation forms, etc).

This adds a new icon and button to the Formbuilder module with "date & time" support. You can enter the label, a default value, required checkbox and most importantly: a dropdown where you can choose between a date or time field. You'll get

### Discussion
I find this a useful update to the Formbuilder **but it needs discussion because of a few problems**:

* I use the Spoon `addDate` and `addTime` methods to create the input element. However, these methods don't seem to support the new HTML5 types: `type="date"` and `type="time"`. Spoon actually creates plain textfields, so no HTML5 date & time fields: the html5 datepicker doesn't appear, the time field doesn't have an up/down button. Is there some way to use HTML5 input fields in Spoon? You can't change the type with `->setAttributes` because it's a reserved attribute. So currently you don't have HTML5 fields in this PR but you can add a date or time field to your form, and it adds the necessary class names for the jQuery UI datepicker. But ideally I'd love to see a HTML5 datepicker by default, and add the jQuery UI as a fallback datepicker.
* Should I keep the validation dropdown and what should I do with it? The HTML5 or jquery fallback datepicker automatically keeps the input validated right? But with no js or html5 field, it should validate the date or time somehow?
* The default value field isn't very useful. However it could have more functionality, e.g. some way to use "+1 weeks" or something as default value. (If you don't fill in the default value, the Spoon addDate or addTime method uses the current date or time.)

### Screenshots
Some screenshots in dutch:
![image](https://cloud.githubusercontent.com/assets/1352979/4518364/d7fbe7b8-4c86-11e4-938c-eb33204c261d.png)

![image](https://cloud.githubusercontent.com/assets/1352979/4518380/46ffab3a-4c88-11e4-8e5e-35b492efe04c.png)

![image](https://cloud.githubusercontent.com/assets/1352979/4518389/3be87e6a-4c89-11e4-83b8-d6dc2883e441.png)