No description, website, or topics provided.
CoffeeScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
README
bump-version.coffee
date_helper.coffee
date_helper.js
datetime_selector.coffee
datetime_selector.js
package.json

README

A first go at porting Rail's DateHelper to Coffeescript.

A very simple example usage.

DateHelper = require 'date-helper'
DateHelper = DateHelper.DateHelper
DateHelper.date_select('article', 'written_on', default: new Date('2008-3-5'), order: ['month', 'year'])
==>
'<input id="article_written_on_3i" name="article[written_on(3i)]" type="hidden" value="1" />\n<select id="article_written_on_2i" name="article[written_on(2i)]">\n<option value="1">January</option>\n<option value="2">February</option>\n<option selected="selected" value="3">March</option>\n<option value="4">April</option>\n<option value="5">May</option>\n<option value="6">June</option>\n<option value="7">July</option>\n<option value="8">August</option>\n<option value="9">September</option>\n<option value="10">October</option>\n<option value="11">November</option>\n<option value="12">December</option>\n</select>\n<select id="article_written_on_1i" name="article[written_on(1i)]">\n<option value="2003">2003</option>\n<option value="2004">2004</option>\n<option value="2005">2005</option>\n<option value="2006">2006</option>\n<option value="2007">2007</option>\n<option selected="selected" value="2008">2008</option>\n<option value="2009">2009</option>\n<option value="2010">2010</option>\n<option value="2011">2011</option>\n<option value="2012">2012</option>\n<option value="2013">2013</option>\n</select>\n'