<?xml version="1.0"?>
<t t-name="website_blog.date_selector">
    <select name="archive" oninput="location = this.value;" class="form-select">
        <option t-att-value="blog_url(date_begin=False, date_end=False) if blog else '/blog'" t-att="[('selected' if (not date_begin) else 'unselected' ) , 'true' ]">
                All dates
        </option>

        <optgroup t-foreach="nav_list" t-as="year" t-attf-label="#{year}">
            <option t-foreach="nav_list[year]" t-as="months" t-att="[('selected' if date_begin and (months['date_begin'] == date_begin) else 'unselected' ) , 'true' ]" t-attf-value="#{blog_url(date_begin=months['date_begin'], date_end=months['date_end'], tag=tag)}">
                <t t-esc="months['month']"/>
                <t t-esc="year"/>
            </option>
        </optgroup>
    </select>
</t>

