fix date selector value fill back problem
This commit is contained in:
parent
f8873267a2
commit
de035cb89a
|
@ -32,13 +32,15 @@
|
||||||
today = today.format('isoDate');
|
today = today.format('isoDate');
|
||||||
var state = false;
|
var state = false;
|
||||||
var arr = state ? "▼" : "▲"
|
var arr = state ? "▼" : "▲"
|
||||||
|
var start_date = <%= "'#{@ad_image.post_date.strftime('%Y / %m / %d')}'"%> || today
|
||||||
|
var end_date = <%= "'#{@ad_image.unpost_date.strftime('%Y / %m / %d')}'"%> || today
|
||||||
//calendarRange
|
//calendarRange
|
||||||
$('#calendarRange .showDate').html(today+" - "+today)
|
$('#calendarRange .showDate').html(start_date+" - "+end_date)
|
||||||
$('#calendarRange .calendarInput').val(today+" - "+today);
|
$('#calendarRange .calendarInput').val(start_date+" - "+end_date);
|
||||||
$('#calendarRange #widgetCalendar').DatePicker({
|
$('#calendarRange #widgetCalendar').DatePicker({
|
||||||
flat: true,
|
flat: true,
|
||||||
format: 'Y / m / d',
|
format: 'Y / m / d',
|
||||||
date: today,
|
date: [start_date,end_date],
|
||||||
calendars: 1,
|
calendars: 1,
|
||||||
mode: 'range',
|
mode: 'range',
|
||||||
starts: 1,
|
starts: 1,
|
||||||
|
|
Loading…
Reference in New Issue