You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that momentJS lowercase all strings. You can try on your browser
moment().format("dddd D MMMM YYYY HH:mm")
Or whatever format and that will set all datetime inputs to lower case.
The datetime parser on lib/rails_admin/support/datetime.rb method delocalize asumes all words are titleized. So when that method is called by parse_string it will return the same string, not having delocalized anything so when the DateTime.strptime is called it will receive a string in spanish or whatever and raise ArgumentError returning nil.
I fixed it by editing lib/rails_admin/support/datetime.rb delocalize method adding the titleize method.
How should i proceed?
** update **
To avoid having to maintain my own fork of rails admin i just added a js file on the edit action that changes moment to use custom Titleized translations
I found that momentJS lowercase all strings. You can try on your browser
Or whatever format and that will set all datetime inputs to lower case.
The datetime parser on
lib/rails_admin/support/datetime.rb
method delocalize asumes all words are titleized. So when that method is called by parse_string it will return the same string, not having delocalized anything so when the DateTime.strptime is called it will receive a string in spanish or whatever and raise ArgumentError returning nil.I fixed it by editing lib/rails_admin/support/datetime.rb
delocalize
method adding the titleize method.How should i proceed?
** update **
To avoid having to maintain my own fork of rails admin i just added a js file on the edit action that changes moment to use custom Titleized translations
The text was updated successfully, but these errors were encountered: