Skip to content

Commit

Permalink
Dev: follow #14080 : issue with '' == 0 only for minutes and seconds …
Browse files Browse the repository at this point in the history
…needed
  • Loading branch information
Shnoulle committed Sep 26, 2018
1 parent 1682602 commit d148393
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Expand Up @@ -11,10 +11,7 @@
{{ gT('Day') }}
</label>
<select id="day{{dayId}}" name="day{{dayId}}" class="form-control day">
<option value="">
{{ gT('Day') }}
</option>

<option value="">{{ gT('Day') }}</option>
{% for i in 1..31 %}
<option value="{{ sprintf('%02d', i) }}"{% if i == intval(currentday) %} selected{% endif %}>
{{ sprintf('%02d', i) }}
Expand Down
Expand Up @@ -10,11 +10,11 @@
<label for="hour{{ hourId }}" class="sr-only">
{{ gT('Hour') }}
</label>

<select id="hour{{ hourId }}" name="hour{{ hourId }}" class="hour form-control">
<option value="">{{ gT('Hour') }}</option>
{% for i in 0..23 %}
<option value="{{ i }}"{% if i == intval(currenthour) %} selected{% endif %}>
{# currenthour are sent as padded integer ( '00','01'), i is integer, need testing !== '' and intval #}
<option value="{{ i }}"{% if (currenthour is not same as('') and i == intval(currenthour)) %} selected{% endif %}>
{% if (datepart=='H') %}
{{sprintf('%02d', i)}}
{% else %}
Expand Down
Expand Up @@ -18,7 +18,8 @@
</option>
{% for i in 0..59 %}
{% if i is divisible by(dropdown_dates_minute_step) %}
<option value="{{ i }}"{% if i == intval(currentminute) %} selected{% endif %}>
{# currentminute are sent as padded integer ( '00','01'), i is integer, need testing !== '' and intval #}
<option value="{{ i }}"{% if (currentminute is not same as('') and i == intval(currentminute)) %} selected{% endif %}>
{% if datepart is same as('i') %}
{{ sprintf('%02d', i) }}
{% else %}
Expand Down

0 comments on commit d148393

Please sign in to comment.