Skip to content

Commit 07c9e2c

Browse files
committed
docs: add examples for date and datetime customization input types in blueprint YAML structure
1 parent f22e2c8 commit 07c9e2c

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

docs/blueprint-designer-guide/blueprints/blueprints-yaml-structure.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,8 +1591,53 @@ grains: ...
15911591
- `duration` (duration selector)
15921592
- `env-name` (environment name selector)
15931593
- `object` (JSON object display/editor)
1594+
- `date` (date picker)
1595+
- `datetime` (date and time picker)
15941596
- **`header`**: Optional comma-separated header names for `object` type display
15951597

1598+
#### Date and datetime customization input type example
1599+
1600+
```yaml
1601+
spec_version: 2
1602+
description: customization date and datetime input type example
1603+
1604+
customization:
1605+
launch-form:
1606+
sections:
1607+
- name: Request Section
1608+
inputs:
1609+
- name: agent
1610+
- name: input1
1611+
type: date
1612+
- name: input2
1613+
type: datetime
1614+
inputs:
1615+
agent:
1616+
type: agent
1617+
input1:
1618+
type: string
1619+
input2:
1620+
type: string
1621+
grains:
1622+
validate:
1623+
kind: shell
1624+
spec:
1625+
agent:
1626+
name: '{{ .inputs.agent }}'
1627+
activities:
1628+
deploy:
1629+
commands:
1630+
- echo {{ .inputs.input1 }}
1631+
- echo {{ .inputs.input2 }}
1632+
```
1633+
1634+
Expected output:
1635+
1636+
```text
1637+
input1: 2025-03-19T00:00:00
1638+
input2: 2025-05-25T18:30:41
1639+
```
1640+
15961641
The `visible` property uses Liquid templating syntax to create dynamic conditions. Common patterns include:
15971642
- `{% if inputs.field_name == "value" %} true {% else %} false {% endif %}` - Show input when another field equals a specific value
15981643
- `{% if inputs.field_name != "value" %} true {% else %} false {% endif %}` - Show input when another field doesn't equal a specific value

0 commit comments

Comments
 (0)