Skip to content

Commit

Permalink
fixed #109
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Treubert committed Sep 28, 2022
1 parent ac76465 commit a9e0615
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
10 changes: 6 additions & 4 deletions app/views/holidays/edit.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
</tr>
<tr>
<td><label><%= translate 'start' %></label></td>
<td><input type="text" id="holiday_start" name="holiday[start]" /></td>
<td><input type="text" id="holiday_start" name="holiday[start]" autocomplete="off" /></td>
</tr>
<tr>
<td><label><%= translate 'end' %></label></td>
<td><input type="text" id="holiday_end" name="holiday[end]" /></td>
<td><input type="text" id="holiday_end" name="holiday[end]" autocomplete="off" /></td>
</tr>
</table>
<input type="submit" value="<%= translate 'save' %>" />
Expand Down Expand Up @@ -54,7 +54,8 @@
timepicker: false,
datepicker: true,
format: 'Y-m-d',
value: '<%= @holiday.start.blank? ? '' : @holiday.start.to_date.to_s %>'
value: '<%= @holiday.start.blank? ? '' : @holiday.start.to_date.to_s %>',
dayOfWeekStart: <%= (Setting.plugin_mega_calendar['week_start'].blank? ? '1' : Setting.plugin_mega_calendar['week_start'].to_s ) %>
};
var options_end = {
i18n: {
Expand All @@ -66,7 +67,8 @@
timepicker: false,
datepicker: true,
format: 'Y-m-d',
value: '<%= @holiday.end.blank? ? '' : @holiday.end.to_date.to_s %>'
value: '<%= @holiday.end.blank? ? '' : @holiday.end.to_date.to_s %>',
dayOfWeekStart: <%= (Setting.plugin_mega_calendar['week_start'].blank? ? '1' : Setting.plugin_mega_calendar['week_start'].to_s ) %>
};
$("#holiday_start").datetimepicker(options_start);
$("#holiday_end").datetimepicker(options_end);
Expand Down
7 changes: 4 additions & 3 deletions app/views/holidays/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
</tr>
<tr>
<td><label><%= translate 'start' %></label></td>
<td><input type="text" id="holiday_start" name="holiday[start]" /></td>
<td><input type="text" id="holiday_start" name="holiday[start]" autocomplete="off" /></td>
</tr>
<tr>
<td><label><%= translate 'end' %></label></td>
<td><input type="text" id="holiday_end" name="holiday[end]" /></td>
<td><input type="text" id="holiday_end" name="holiday[end]" autocomplete="off" /></td>
</tr>
</table>
<input type="submit" value="<%= translate 'save' %>" />
Expand All @@ -49,7 +49,8 @@
},
timepicker: false,
datepicker: true,
format: 'Y-m-d'
format: 'Y-m-d',
dayOfWeekStart: <%= (Setting.plugin_mega_calendar['week_start'].blank? ? '1' : Setting.plugin_mega_calendar['week_start'].to_s ) %>
};
$("#holiday_start").datetimepicker(options);
$("#holiday_end").datetimepicker(options);
Expand Down
2 changes: 1 addition & 1 deletion init.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
name 'Mega Calendar plugin'
author 'Andreas Treubert'
description 'Better calendar for redmine'
version '1.9.2'
version '1.9.3'
url 'https://github.com/berti92/mega_calendar'
author_url 'https://github.com/berti92'
requires_redmine :version_or_higher => '5.0.0'
Expand Down

0 comments on commit a9e0615

Please sign in to comment.