diff --git a/app/views/admin/ad_images/_form.html.erb b/app/views/admin/ad_images/_form.html.erb index 3ecda29b7..b4f65fd9d 100644 --- a/app/views/admin/ad_images/_form.html.erb +++ b/app/views/admin/ad_images/_form.html.erb @@ -36,8 +36,8 @@ today = today.format('isoDate'); var state = false; var arr = state ? "▼" : "▲" - var start_date = <%= @ad_image.post_date.nil?? 'today' : "'#{@ad_image.post_date.strftime('%Y / %m / %d')}'" %>; - var end_date = <%= @ad_image.unpost_date.nil?? 'today' : "'#{@ad_image.unpost_date.strftime('%Y / %m / %d')}'" %>; + var start_date = <%= (@ad_image.post_date.nil?? 'today' : "'#{@ad_image.post_date.strftime('%Y / %m / %d')}'").html_safe %>; + var end_date = <%= (@ad_image.unpost_date.nil?? 'today' : "'#{@ad_image.unpost_date.strftime('%Y / %m / %d')}'").html_safe %>; //calendarRange $('#calendarRange .showDate').html(start_date+" - "+end_date); $('#calendarRange .calendarInput').val(start_date+" - "+end_date);