From 82db58321703e9b094014dc9dc0d717f0ef70149 Mon Sep 17 00:00:00 2001 From: gotens1211 Date: Mon, 20 Feb 2017 01:52:50 +0530 Subject: [PATCH] Default date removed from conference registrations. --- app/assets/javascripts/osem-datepickers.js | 2 -- .../conference_registrations/_registration_info.html.haml | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/osem-datepickers.js b/app/assets/javascripts/osem-datepickers.js index 169ff4b6..ff0b6860 100644 --- a/app/assets/javascripts/osem-datepickers.js +++ b/app/assets/javascripts/osem-datepickers.js @@ -18,7 +18,6 @@ $(function () { // current_date <= arrival_date <= end_date maxDate : $("#registration-arrival-datepicker").attr('end_date'), minDate : today, - defaultDate : $("#registration-arrival-datepicker").attr('start_date'), }); $("#registration-departure-datepicker").datetimepicker({ @@ -29,7 +28,6 @@ $(function () { format: "YYYY-MM-DD HH:mm", // departure_date > start_date minDate : $("#registration-arrival-datepicker").attr('start_date'), - defaultDate : $("#registration-arrival-datepicker").attr('end_date'), }); $("#registration-arrival-datepicker").on("dp.change",function (e) { diff --git a/app/views/conference_registrations/_registration_info.html.haml b/app/views/conference_registrations/_registration_info.html.haml index 5cdeb536..e9d6e12a 100644 --- a/app/views/conference_registrations/_registration_info.html.haml +++ b/app/views/conference_registrations/_registration_info.html.haml @@ -17,5 +17,5 @@ = f.inputs 'Your Travel Info' do - = f.input :arrival, as: :string, label: 'Your arrival time', input_html: { value: (f.object.arrival.to_formatted_s(:db_without_seconds) unless f.object.arrival.nil?), id: 'registration-arrival-datepicker',start_date: @conference.start_date,end_date: @conference.end_date,readonly: 'readonly' } - = f.input :departure, as: :string, label: 'Your departure time', input_html: { value: (f.object.departure.to_formatted_s(:db_without_seconds) unless f.object.departure.nil?), id: 'registration-departure-datepicker', readonly: 'readonly' } + = f.input :arrival, as: :string, label: 'Your arrival time', hint: "Leave blank if not sure", input_html: { value: (f.object.arrival.to_formatted_s(:db_without_seconds) unless f.object.arrival.nil?), id: 'registration-arrival-datepicker',start_date: @conference.start_date,end_date: @conference.end_date} + = f.input :departure, as: :string, label: 'Your departure time', hint: "Leave blank if not sure", input_html: { value: (f.object.departure.to_formatted_s(:db_without_seconds) unless f.object.departure.nil?), id: 'registration-departure-datepicker'}