upmin / upmin-admin-ruby

Framework for creating powerful admin backends with minimal effort in Ruby on Rails.
MIT License
757 stars 66 forks source link

Datepicker always only insert the current month in datetime fields #142

Closed ameft closed 9 years ago

ameft commented 9 years ago

I've just noticed that the datepicker included in upmin has some problems with (only) the month of the picked date: it will indeed always insert the current month in the value of the hidden input field of the date. Day, year and time are correctly picked instead. It is worth noting that the picked date is correctly displayed to the user in the date field, but that date it's not the same that it's inserted in the hidden field and therefore saved to the database, in which the month is always the current. I've tried to change the date of my pc with jenuary to confirm that the month inserted is the current. I'm using the current upmin master. The problem is only mine? I've tried with Chrome, FF, and IE.

joncalhoun commented 9 years ago

Sorry for the delay - this is likely a bug. I'll have to dig into it this week. Not sure how it slipped by. Def need tests for this.

ameft commented 9 years ago

Thank you Jon!

ameft commented 9 years ago

Any news about the fix of this issue? It's quite important. Thanks!

jdurand commented 9 years ago

Can you still reproduce this? It's seems to work properly on my end : Gyazo

ameft commented 9 years ago

I've updated upmin from the master branch but the problem persists, as you can see the month doesn't change in the hidden input field (displayed 2015-05-20, stored 2015-04-20):

Cool thing Gyazo BTW! :)

jdurand commented 9 years ago

From the look of it, the datetime input has likely never worked before. This is now fixed.

Yep, Gyazo is pretty neat ;-)

ameft commented 9 years ago

Amazing thanks!