Not reading blocked dates from external json file
What's the issue?
Date picker does not recognize blocked dates that are specified in external json file
How do we reproduce the issue?
read blocked dates from json file. If blocked dates are specified inside the amp-date-picker then they are marked correctly. The same issue happens for highlighted too.
Here the date range picker
<amp-date-picker
type="range"
mode="static"
layout="fixed-height"
id="range-date-picker"
height="345"
on="
select:
AMP.setState({
dates: event.dates,
startDate: event.start,
endDate: event.end
})"
format="M/D/YYYY"
src="/amptest.json"
number-of-months="3"
start-input-selector="#range-start"
end-input-selector="#range-end"
class="example-picker space-between">
<template type="amp-mustache"
info-template>
<span [text]="(startDate && endDate ?
'You picked ' + startDate.date + ' as start date and ' + endDate.date + ' as end date.' :
'You will see your chosen dates here.')">
You will see your chosen dates here.
</span>
</template>
<template type="amp-mustache"
date-template
id="spooky">
<span>🙀</span>
</template>
</amp-date-picker>
Here the json file
{
"blocked": ["2018-09-21", "2018-09-22"],
"startDate": "2018-09-14",
"endDate": "2018-09-16"
}
Here the screenshot

This change is merged and will be live in production following our release schedule. Thanks for reporting @Felixbachmann!