{% extends 'ef_basic_input.html' %}

{% block input %}
	{% if field.readonly %}
		<input type="hidden" name="{{ field.name }}-month" value="{{ month }}">
		<input type="hidden" name="{{ field.name }}-year" value="{{ year }}">
		<input type="text" disabled value="{{ field.value.strftime('%d/%m/%Y') if field.value else '' }}">
	{% else %}
		<select id="{{ field.id }}-month" name="{{ field.name }}-month" size="1"
				style="width:130px" class="{{ field.input_classes }} pull-left float-left">
			<option value="">Month:</option>
			{% for month_name in ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September',
							 'October', 'November', 'December'] %}
				<option value="{{ loop.index }}" {% if month == loop.index %}selected="selected"{% endif %}>
					{{ month_name }}
				</option>
			{% endfor %}
		</select>
		<select id="{{ field.id }}-year" name="{{ field.name }}-year" size="1"
		        style="width:130px" class="{{ field.input_classes }} pull-left float-left">
			<option value="">Year:</option>
	     	{% for y in field.years %}
	     	   <option value="{{ y }}"
	     			   {% if year==y %}selected="selected"{% endif %}
	     			   >{{ y }}</option>
	     	{% endfor %}
	    </select>
		<br style="clear: both">
	{% endif %}
{% endblock input %}
