ampproject / ampproject/amphtml

Datepicker: templates not updating on JSON-Response

Open
#33,394 1 comment 0 reactions 0 assignees View on GitHub
Stale Type: Bug
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.