Manual icon indicating copy to clipboard operation
Manual copied to clipboard

Update calendar.md

Open rogercreagh opened this issue 8 months ago • 7 comments

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.
  • rogercreagh avatar Apr 25 '25 06:04 rogercreagh

    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

    qodo-code-review[bot] avatar Apr 25 '25 06:04 qodo-code-review[bot]

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    qodo-code-review[bot] avatar Apr 25 '25 06:04 qodo-code-review[bot]

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

    ceford avatar Apr 25 '25 08:04 ceford

    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"

    rogercreagh avatar Apr 25 '25 16:04 rogercreagh

    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.

    ceford avatar Apr 26 '25 02:04 ceford

    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.

    rogercreagh avatar Apr 26 '25 11:04 rogercreagh

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

    ceford avatar Apr 26 '25 20:04 ceford