restrict date range to lifespan of addon (bug 697372)
This commit is contained in:
Родитель
b1a3f6574c
Коммит
dc9c047b7a
|
@ -73,6 +73,7 @@
|
|||
<pre id="dbgout"></pre>
|
||||
</div>
|
||||
<div class="primary statistics"
|
||||
data-min-date="{{ addon.created|isotime }}"
|
||||
data-report="{{ report }}"
|
||||
data-addon_id="{{ addon.id }}"
|
||||
{% if view.last %}
|
||||
|
|
|
@ -3,19 +3,22 @@
|
|||
|
||||
var $rangeSelector = $(".criteria.range ul"),
|
||||
$customRangeForm = $("div.custom.criteria"),
|
||||
$groupSelector = $(".criteria.group ul");
|
||||
$groupSelector = $(".criteria.group ul"),
|
||||
minDate = Date.iso($('.primary').attr('data-min-date'));
|
||||
|
||||
$.datepicker.setDefaults({showAnim: ''});
|
||||
var $customModal = $("#custom-criteria").modal("#custom-date-range", { width: 520, hideme: false });
|
||||
var $startPicker = $("#start-date-picker").datepicker({
|
||||
maxDate: 0,
|
||||
maxDate: 1,
|
||||
minDate: minDate,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
onSelect: function(dateText) {
|
||||
$("#date-range-start").val(dateText);
|
||||
}
|
||||
});
|
||||
var $endPicker = $("#end-date-picker").datepicker({
|
||||
maxDate: 0,
|
||||
maxDate: 1,
|
||||
minDate: minDate,
|
||||
dateFormat: 'yy-mm-dd',
|
||||
onSelect: function(dateText) {
|
||||
$("#date-range-end").val(dateText);
|
||||
|
|
Загрузка…
Ссылка в новой задаче