ampproject / ampproject/amphtml
Datepicker: templates not updating on JSON-Response
- Dominant language
- JavaScript
- Stars
- 14.9k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
## What's the issue?
On dynamically updating `src` the calendar view is not updated with given templates. Only after moving a month forwards or backwards and then going back the calendar view updates with new values.
## How do we reproduce the issue?
https://www.leonids.de/amp-date-picker.html
1. Change the date and press Enter.
2. See how the marked date is **not** updated
3. Go one month forwards
4. Go back to March
5. Watch the mark setting in place
HTML
```
⚡️
```
JSON
```
{
"templates": [
{
"id": "testTmpl",
"dates": ["2021-03-15"]
}
]
}
```
## What browsers are affected?
Tested on Chrome/Firefox/Edge -- Android/Mac/Win
## Which AMP version is affected?
amp-date-picker 0.1
Contributor guide
Research direction
Reproduce the behavior at https://www.leonids.de/amp-date-picker.html using the listed HTML and JSON response, then inspect the amp-date-picker implementation and its dynamic src update path. Done means changing the date refreshes the marked template immediately, without navigating to another month and back.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100