aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/general/_localised_datepicker.rhtml
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-09-16 12:43:27 +0100
committerSeb Bacon <seb.bacon@gmail.com>2011-09-16 12:43:27 +0100
commit312f9e1191dd4d7d0e976728561c4b74d8b84588 (patch)
tree506a615c2bbb95cf7f30a1655ef6ccd7e2d2f521 /app/views/general/_localised_datepicker.rhtml
parent8a0210db99a146a2700a5db0335618423ea756a0 (diff)
parentd54f405434a3b0da5f2c88fc065680caf044aff2 (diff)
Merge branch 'release/0.3'0.3
Diffstat (limited to 'app/views/general/_localised_datepicker.rhtml')
-rw-r--r--app/views/general/_localised_datepicker.rhtml18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/views/general/_localised_datepicker.rhtml b/app/views/general/_localised_datepicker.rhtml
new file mode 100644
index 000000000..5fdd63644
--- /dev/null
+++ b/app/views/general/_localised_datepicker.rhtml
@@ -0,0 +1,18 @@
+<script type="text/javascript">
+ $(function() {
+ $(".use-datepicker").datepicker(
+ {closeText: '<%= _("Done") %>',
+ prevText: '<%= _("Prev") %>',
+ nextText: '<%= _("Next") %>',
+ currentText: '<%= _("Today") %>',
+ monthNames: <%= I18n.translate('date.month_names')[1..-1].to_json %>,
+ monthNamesShort: <%= I18n.translate('date.abbr_month_names')[1..-1].to_json %>,
+ dayNames: <%= I18n.translate('date.day_names').to_json %>,
+ dayNamesShort: <%= I18n.translate('date.abbr_day_names').to_json %>,
+ dayNamesMin: <%= I18n.translate('date.abbr_day_names').collect{|x| x[0..0]}.to_json %>,
+ weekHeader: '<%= _("Wk") %>',
+ dateFormat: '<%= I18n.translate('date.formats.default').sub("%Y", "yy").sub("%m", "mm").sub("%d", "dd").gsub("-", "/") %>'}
+ );
+ });
+</script>
+