Closed gks66 closed 10 months ago
@gks66 are you really using version. 4.1.10 of the formio.js library? If so, then we recommend upgrading to a newer version. Our latest stable version of the formio.js library is 4.11.3.
Can you try and see if this issue occurs on the latest?
Thank you.
Sorry, the version is 4.11.1 I am using https://formio.github.io/formio.js/app/sandbox to test, not working also.
It looks like you have not added an Action to the Logic on the select component. Here is an example of our field logic: https://formio.github.io/formio.js/app/examples/fieldLogic.html
I hope that this helps.
Hi, tried with the example, it was not working.
New sample json:
{
"display": "form",
"settings": {
"pdf": {
"id": "1ec0f8ee-6685-5d98-a847-26f67b67d6f0",
"src": "https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0"
}
},
"components": [
{
"label": "Edit Grid",
"tableView": false,
"redrawOn": "data",
"rowDrafts": false,
"key": "editGridObservation",
"type": "editgrid",
"input": true,
"components": [
{
"label": "Select",
"widget": "choicesjs",
"tableView": true,
"data": {
"values": [
{
"label": "3 days",
"value": "days3"
},
{
"label": "7 days",
"value": "days7"
}
]
},
"selectThreshold": 0.3,
"key": "selectAction",
"type": "select",
"indexeddb": {
"filter": {}
},
"datetiemAction": "2020-09-03T00:00:00+08:00",
"input": true
},
{
"label": "Date / Time",
"tableView": false,
"enableMinDateInput": false,
"datePicker": {
"disableWeekends": false,
"disableWeekdays": false
},
"enableMaxDateInput": false,
"key": "dateTimeAction",
"logic": [
{
"name": "days3",
"trigger": {
"type": "simple",
"simple": {
"show": true,
"when": "editGridObservation.selectAction",
"eq": "days3"
}
},
"actions": [
{
"name": "days3",
"type": "value",
"value": "value=moment().add(3,'days').format('YYYY-MM-DD HH:mm:ssZ')"
}
]
},
{
"name": "days7",
"trigger": {
"type": "simple",
"simple": {
"show": true,
"when": "editGridObservation.selectAction",
"eq": "days7"
}
},
"actions": [
{
"name": "days7",
"type": "value",
"value": "value=moment().add(7,'days').format('YYYY-MM-DD HH:mm:ssZ')"
}
]
}
],
"type": "datetime",
"input": true,
"widget": {
"type": "calendar",
"displayInTimezone": "viewer",
"locale": "en",
"useLocaleSettings": false,
"allowInput": true,
"mode": "single",
"enableTime": true,
"noCalendar": false,
"format": "yyyy-MM-dd hh:mm a",
"hourIncrement": 1,
"minuteIncrement": 1,
"time_24hr": false,
"minDate": null,
"disableWeekends": false,
"disableWeekdays": false,
"maxDate": null
}
}
]
},
{
"type": "button",
"label": "Submit",
"key": "submit",
"disableOnInvalid": true,
"input": true,
"tableView": false
}
]
}
yes, its now working for me too. Any solution available?
We're currently addressing a backlog of GitHub issues. Closing this thread as it is outdated. Please re-open if it is still relevant. Thank you for your contribution!
Environment
Steps to Reproduce
Expected behavior
The datetime component should update when the dropdown option is seleted.
Example
1.
2.
3.
4.