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

[Calendar] Document usage scope of format tokens #524

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

dreaming-augustin
Copy link
Contributor

Improve the documentation for the original usage, emphasizing that a JavaScript Date object was being returned by the relevant Calendar Behaviors.

Also, document the new Behaviors with the optional format parameter.

Documents: fomantic/Fomantic-UI#3141

@dreaming-augustin
Copy link
Contributor Author

I was working on using Fomantic Calendar for a project, but I was originally confused by the existing documentation.
I originally thought that the formatter applied to the date we got from $('.ui.calendar').calendar('get date');. It was not clear that a JavaScript Date object was being returned, and that the formatter applied to the cells only.

Now, we get the best of both worlds and the documentation is more explicit.

Comment on lines +342 to +343
<p>The format is applied to the calendar cells.</p>
<p>These same tokens can be used to format the date gotten through <a href="#/usage>behaviors</a>.</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. The format token is not only applied to the calendar cells but for several date outputs mentioned as tokens in the settings
image

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

Successfully merging this pull request may close these issues.

2 participants