Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defaultWeekStartDay Support #11

Closed
howells opened this issue Apr 13, 2017 · 8 comments
Closed

defaultWeekStartDay Support #11

howells opened this issue Apr 13, 2017 · 8 comments
Assignees

Comments

@howells
Copy link

howells commented Apr 13, 2017

I have my defaultWeekStartDay set to Monday, but the plugin starts on Sunday - shouldn't it honour whatever the default is set to?

@brandonkelly brandonkelly changed the title Shouldn't the plugin honour the defaultWeekStartDay config item defaultWeekStartDay Support Apr 13, 2017
@brandonkelly
Copy link
Member

That config setting, and users’ Week Start Day settings, are currently only used when displaying the calendar popups on date inputs. But we could update Store Hours to respect it as well, yes.

@howells
Copy link
Author

howells commented Apr 13, 2017

@brandonkelly that would be awesome :-) I tried to work out how to do it for a PR but failed miserably

@brandonkelly
Copy link
Member

Haha that’s ok, we’ll get to it.

@howells
Copy link
Author

howells commented Apr 18, 2017

Thanks for making this update! But it seems the release hasn't been made so the 1.2 update shown in the CP doesn't link to anywhere. (https://codeload.github.com/pixelandtonic/StoreHours/zip/1.2)

@angrybrad
Copy link
Member

Should be resolved now!

@gregorydavidjenkins
Copy link

gregorydavidjenkins commented Sep 8, 2017

Doesn't this break the output though?

If you use the recommended output method of creating a days array, the accuracy of the information being outputted changes depending on who the last person to update the entry was.

If USER A has their week starting on Monday and saves the entry it breaks the output, if you change your array to reflect that and USER B (whose week starts on Sunday) updates the entry, it is broken again.

Do I need to check the defaultWeekStartDay of the last user to update the page and create my array from there? I think the name of the day of the week should be built into the data coming from the field.

@brandonkelly
Copy link
Member

@gregorydavidjenkins That change shouldn't have affected the way the data is stored, with the first day being Sunday. Are you just speculating or have you actually found the data to be ordered differently?

@brandonkelly
Copy link
Member

(and if the latter, please open a new issue so we can track it separately from the original feature request.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants