{"issue":{"created_at":"2011-12-09T12:00:25Z","state":"open","updated_at":"2011-12-14T09:18:50Z","user":{"gravatar_id":"05c3f39db309047f28628a223a757bec","id":46467,"url":"https://api.github.com/users/Marmolin","login":"Marmolin","avatar_url":"https://secure.gravatar.com/avatar/05c3f39db309047f28628a223a757bec?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":13,"body":"Tried to use this gem after failing using your other datepicker gems\r\nUses rails 3.1.1 and formtastic .2.0.2 added this gem to the gemfile (no problem after moving it below the formtastic gem)\r\n\r\nAdd  this to a js file\r\n$(document).ready(function(){\r\n        $('input.ui-date-picker').datepicker();\r\n    });\r\nas described\r\n\r\ntriied to use it as\r\n\t<%= address.input :name ,:as=>:date_picker %>\t\r\nin a sematic form block\r\nGot the error \r\n$(\"#input.ui-date-picker\").datepicker is not a function\r\nAny suggestion ?","assignee":null,"id":2500832,"labels":[],"number":1,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"title":"$(\"#input.ui-date-picker\").datepicker is not a function","html_url":"https://github.com/kristianmandrup/formtastic_datepicker-rails3x/issues/1","closed_at":null,"url":"https://api.github.com/repos/kristianmandrup/formtastic_datepicker-rails3x/issues/1","milestone":null},"action":"created","comment":{"created_at":"2011-12-14T09:18:50Z","updated_at":"2011-12-14T09:18:50Z","user":{"gravatar_id":"05c3f39db309047f28628a223a757bec","id":46467,"url":"https://api.github.com/users/Marmolin","login":"Marmolin","avatar_url":"https://secure.gravatar.com/avatar/05c3f39db309047f28628a223a757bec?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Hi\r\nI suspected that \r\nThe options had to be part of some installation process, at least as a start\r\n\r\nAnother problem is localization. \r\nThere are different javascript files for each language.\r\nIn one application I use only one language so I could just do it as a part of the installation, but in other applications \r\nI would like to be able to switch between different languages. \r\nAny idee of how to dynamically change language i.e javascript file from rails I18n?\r\nThere are gems like https://github.com/fnando/i18n-js, but datepicker localization is done as a function\r\nJQuery(function($){ $.datepicker.regional['sv'] = {clearText: 'Rensa',........}; $.datepicker.setDefaults($.datepicker.regional['sv']);\r\nthat  defines the local words and select language. \r\nMaybe one can load all needed language functions and just add a way to dynamically set $.datepicker.regional[I18n.locale] when\r\nrails change language i.e\r\nscript type=\"text/javascript\">\r\n  I18n.defaultLocale = \"<%= I18n.default_locale %>\";\r\n  I18n.locale = \"<%= I18n.locale %>\";\r\n</script>\r\n\r\n\r\nYou said that you added me as a collaborator\r\nWhere is that shown?\r\nHow will that make it easier for me to push to your repository?\r\nDo you mean that I should push changes i my fork to your repository or should I download a local version and push from that\r\nas described in\r\nhttp://gitref.org/remotes/\r\nThat guides describe git push  as; push you new branches and data to remote repository.\r\nMy question is then what is the new branches \r\n\r\nSorry to bother you with there question, but I am really a newcomer concerning git and how to use it\r\n\r\n\r\n\r\n____________________________________________\r\nHans Marmolin\r\nSt: Larsgatan 50, 58224 Linkping, Sweden\r\nPhone: +46708371202\r\n\r\n\r\n\r\n14 dec 2011 kl. 00.50 skrev Kristian Mandrup:\r\n\r\n> Most datepicker specific options such as _showWeek_, should be handled from the javascript, not via some Rails options.\r\n> Otherwise you need to extend this somehow:\r\n> \r\n> ```ruby\r\n>    def to_html\r\n>      input_wrapping do\r\n>        label_html <<\r\n>          builder.text_field(input_name, input_html_options)\r\n>      end\r\n>    end\r\n> ```\r\n> \r\n> to dynamically add some javascript that executes the .datepicker() with the specified options... Then you have to look into the formtastic code base to figure out how to do this.\r\n> \r\n> --- \r\n> Reply to this email directly or view it on GitHub:\r\n> https://github.com/kristianmandrup/formtastic_datepicker-rails3x/issues/1#issuecomment-3132908\r\n> ","id":3137240,"url":"https://api.github.com/repos/kristianmandrup/formtastic_datepicker-rails3x/issues/comments/3137240"}}