Skip to content

Update calendar.md #445

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Update calendar.md #445

wants to merge 3 commits into from

Conversation

rogercreagh
Copy link
Contributor

@rogercreagh rogercreagh commented Apr 25, 2025

User description

added info re setting default date to current date


PR Type

Documentation


Description

  • Added documentation for setting default date in calendar field

  • Explained use of default="now" for current date


Changes walkthrough 📝

Relevant files
Documentation
calendar.md
Add documentation for calendar field default date option 

docs/general-concepts/forms-fields/standard-fields/calendar.md

  • Added explanation for the default option in calendar field
  • Described how to set default date to current date using default="now"
  • +1/-0     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • added info re setting default date to current date
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    Copy link
    Contributor

    qodo-merge-pro bot commented Apr 25, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @ceford
    Copy link
    Collaborator

    ceford commented Apr 25, 2025

    It should be made clear that what goes into the Default Date field is the word now for a default date of now.

    @rogercreagh
    Copy link
    Contributor Author

    It should be made clear that what goes into the Default Date field is the word now for a default date of now.

    Is this not clear (from the proposed change):

    You can default to the current date by using default="now"

    @ceford
    Copy link
    Collaborator

    ceford commented Apr 26, 2025

    It should be made clear that what goes into the Default Date field is the word now for a default date of now.

    Is this not clear (from the proposed change):

    You can default to the current date by using default="now"

    I tried it out. The field expects a date and if you enter default="now" there is an error when submitting the form. It took me several tries to figure out that the word now is required.

    @rogercreagh
    Copy link
    Contributor Author

    I tried it out. The field expects a date and if you enter default="now" there is an error when submitting the form. It took me several tries to figure out that the word now is required.

    Ah, so what you put in the xml was default="default="now"" ?!

    Or were you just trying to set the date to the current date by typing "now" into the rendered form instead of pressing the "today" button. I didn't know that that worked but I've just tried it and it does.

    So the confusion is that it wasn't clear that this is about setting the default attribute in the xml so that if no date is entered it comes up with a particular date (default="2016-09-14") or the current date (default="now").

    I'll add
    " for the default attribute in the xml"
    to make it clearer.

    added clarification in response to comment
    @ceford
    Copy link
    Collaborator

    ceford commented Apr 26, 2025

    Avoid the words press and pressing (and click). Use select/selecting which are device agnostic.

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

    Successfully merging this pull request may close these issues.

    3 participants