bernat/best_in_place — pull request #302 by jezcaudle (2013-10-04 09:40:03+00:00)
Title: Added :type :datetime

Hi,

I have added a :datetime :type

I'm no rockstar coder and this is my first time contributing to anything so please be gentle with me - feel free to make this a learning opportunity.

I'm sure the code I have written can be done in a much better way - in the best_in_place.js I simply cut and pasted the "date" section, renamed it "datetime" and changed two little bits to "datetime" - I'm sure there is a DRY way of doing that, but I don't know how to (yet).

For datetime to work the plugin needs to get the date and time in the correct format - that is why display_as and display_with are used to populate the field but then "data-original-content" is not used because it stops the plugin working.

I've lost my OSS Contributor Virginity and like most virginity losing moments I'm sure it will be disappointing but with experience it will get better!!