canopy-forms-date

Implement and validate Canopy lg-date-field inputs in Angular forms.

23|46|Updated Sep 7, 2020
One-click install
npx skills add https://github.com/Legal-and-General/canopy --skill canopy-forms-date
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: canopy-forms-date
Source: https://github.com/Legal-and-General/canopy/tree/main/skills/best-practice/forms-date
Command: npx skills add https://github.com/Legal-and-General/canopy --skill canopy-forms-date

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides best-practice guidance for implementing and validating the Canopy Date Input component in Angular forms, ensuring consistent UX and reliable data capture.

Core Features & Use Cases

  • Guidance on using the lg-date-field component with reactive forms
  • Validation strategies, error handling, and accessibility considerations
  • Use Case: Apply date input best practices across Canopy forms to ensure consistent data entry and ISO date output

Quick Start

Add the lg-date-field to your Angular form and include a validationForm reference with a submit button.

Frequently Asked Questions about canopy-forms-date

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a date input in Angular forms?

To validate a date input in Angular forms, use the Canopy lg-date-field component within a reactive form. Include a validationForm reference and a submit button to trigger validation and ensure the captured data is output as an ISO 8601 date.

What format does the Canopy date field output for data capture?

The Canopy lg-date-field component outputs dates in ISO 8601 (YYYY-MM-DD) format. This ensures consistent data capture and UI standardization across Canopy-based Angular projects.

Do I need a submit button for Angular form validation to work?

Yes, proper validation for the Canopy lg-date-field requires a submit button. You must also include a validationForm reference to ensure the Angular reactive form validation strategies function correctly.

What are the best practices for Angular reactive forms with date inputs?

Best practices for Angular reactive forms with date inputs involve using the lg-date-field component, maintaining a validationForm reference, and ensuring a submit button is present for reliable error handling, accessibility, and ISO date output.

Why does my Canopy date input validation fail to trigger?

Canopy date input validation may fail if the lg-date-field is missing a validationForm reference or lacks a submit button. Both elements are required to properly execute validation strategies in Angular reactive forms.