solidus icon indicating copy to clipboard operation
solidus copied to clipboard

Not update available on date

Open sechix opened this issue 7 years ago • 6 comments

Steps to reproduce

In products show a different date in input datapicker field that in database image

System configuration

Solidus Master last version

sechix avatar May 01 '18 15:05 sechix

Hey @sechix I can't replicate this issue, it seems to be working for me.

If you hit update at the bottom of the product page, does your database match?

Could you post some reproduction steps?

Thanks!

jacobherrington avatar Jun 11 '18 16:06 jacobherrington

image

Update product: image

After update (even refreshing page):

image

image

sechix avatar Jun 11 '18 20:06 sechix

with es-MX you can see this: screen shot 2018-06-13 at 11 40 43 am

and later I got a missing translation error, I created this PR https://github.com/solidusio/solidus_i18n/pull/129 to fix that, with es, es-EC and es-CL is working fine

@sechix what is the locale that are you using?

jtapia avatar Jun 13 '18 18:06 jtapia

I have the same issue. Seems to be related to localization since I use pt-BR and have the exact same issue. My guess is that the datepicker format has a specific format and i18n changes the default date formats, causing the disconnect between the actual value from the input and the datepicker's display

Draiken avatar Oct 01 '18 20:10 Draiken

This line shows how the datepicker format uses i18n to decide the datepicker format. This seems wrong to me, as I imagine the datepicker will always accept one specific format, so it should be hard coded.

Draiken avatar Oct 01 '18 20:10 Draiken

To expand a bit: on the context of solidus_i18n you see a field called spree.date_picker.format and it makes sense to localize that to the local format. However by doing that you break the datepickers on the admin (haven't tested others, but I imagine everywhere that this helper is used will give the same result).

I propose we hard-code the datepicker format to something that always works, since this is not a presentational value but instead a value that is used by a third party library.

Draiken avatar Oct 01 '18 20:10 Draiken