pass locale to datepicker, use gem for that
This commit is contained in:
parent
76645ebd12
commit
8080cd6b7e
8 changed files with 12 additions and 840 deletions
|
|
@ -3,8 +3,9 @@
|
|||
//= require jquery_ujs
|
||||
//= require twitter/bootstrap
|
||||
//= require jquery.tokeninput
|
||||
//= require bootstrap-datepicker
|
||||
//= require bootstrap-datepicker.de
|
||||
//= require bootstrap-datepicker/core
|
||||
//= require bootstrap-datepicker/locales/bootstrap-datepicker.de
|
||||
//= require bootstrap-datepicker/locales/bootstrap-datepicker.nl
|
||||
//= require jquery.observe_field
|
||||
//= require rails.validations
|
||||
//= require_self
|
||||
|
|
@ -112,7 +113,7 @@ $(function() {
|
|||
});
|
||||
|
||||
// Use bootstrap datepicker for dateinput
|
||||
$('.datepicker').datepicker({format: 'yyyy-mm-dd', weekStart: 1, language: 'de'});
|
||||
$('.datepicker').datepicker({format: 'yyyy-mm-dd', language: I18n.locale});
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
/*
|
||||
*= require bootstrap_and_overrides
|
||||
*= require token-input-bootstrappy
|
||||
*/
|
||||
*= require bootstrap-datepicker
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -31,10 +31,6 @@ body {
|
|||
// Example:
|
||||
// @linkColor: #ff0000;
|
||||
|
||||
|
||||
// Bootstrap datepicker
|
||||
@import "datepicker";
|
||||
|
||||
// Custom styles
|
||||
|
||||
// Fix empty dd tags in horizontal dl, see https://github.com/twitter/bootstrap/issues/4062
|
||||
|
|
|
|||
|
|
@ -22,5 +22,7 @@
|
|||
Javascripts
|
||||
\==================================================
|
||||
/ Placed at the end of the document so the pages load faster
|
||||
:javascript
|
||||
I18n = {locale: '#{I18n.locale}'}
|
||||
= javascript_include_tag "application"
|
||||
= yield(:javascript)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue