mugifly / jquery-simple-datetimepicker

Date & time picker for jQuery, It's simple & clean.
http://mugifly.github.com/jquery-simple-datetimepicker
Other
260 stars 182 forks source link

Bug when used in Rails 3 pipeline #70

Open ciaranrennais opened 10 years ago

ciaranrennais commented 10 years ago

Hi,

I have been trying to use query.simple-dtpicker.js within a Rails application. It works fine locally, but it is signaled as erroneous when the Rails 3 pipeline is used.

Specifically, Rails 3 minifies the JavaScript code. When minified, the code seems to produce an error. At first I thought it might be linked to the regex expression on line 221, which reads /^(\d{2,4})-/-/ (\d{1,2}):(\d{1,2})$/, and which should read /^(\d{2,4})-\/-\/ (\d{1,2}):(\d{1,2})$/ (i.e., the '/' characters need to be escaped...)

I was wondering has anyone encountered similar problems.

regards,

Ciarán

lstrzebinczyk commented 10 years ago

Same problem here in rails4. I did not expect that.

mugifly commented 10 years ago

I hope to fix this issue, but I can't confirm in immediately because I was not developing with using Rails.

Someone, please.