DatetimeField and TimeField generate invalid HTML

 DatetimeField and TimeField generate invalid HTML due to JSON being rendered in the class attribute.

This pull request removes the json from the class attributes and adds it to a data- attribute instead