Category : daterangepicker

const onChangeTourSeasonalDates = (task,dateStrings) => { // console.log("Seasosnal dates",dates[0]._d) const formState = [{ index: task.index, startRange: dateStrings[0], endRange: dateStrings[1] }]; const newTourSeasonalDate = state.tourSeasonalDates.map(item => { return item.index === formState.index ? formState : item; }); console.log(‘task is task ‘, newTourSeasonalDate); setState({ …state, tourSeasonalDates: { …state.tourSeasonalDates, newTourSeasonalDate } }); }; {state.tourSeasonalDates.map(task => ( <DateRangeComponent onChange={()=>onChangeTourSeasonalDates(task)} onClickMinusButton={() ..

Read more

I have used following line to use daterangepicker in my page <div id="reportrange" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%"> <i class="fa fa-calendar"></i>&nbsp; <span></span> <i class="fa fa-caret-down"></i> </div> when i print in my javascript part console.log($(‘#reportrange span’).text()) i got output like April 5, 2021 – April 28, 2021 How ..

Read more

I want to get startDate and endDate after selected from datepicker with the following code so i can do ajax call back but nothing gets printed. Here is the HTML part? <div id="reportrange" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc; width: 100%"> <i class="fa fa-calendar"></i>&nbsp; <span></span> <i class="fa fa-caret-down"> </i> </div> ..

Read more

I’m trying to use 7 Daterangepickers for planning 7 daterange one after the others. The idea is the following: when a daterange is selected clicking on "Apply", all the following daterange auto-update choosing following dateranges. $(‘.sprintdate’).on(‘apply.daterangepicker’, function (ev, picker) { var sprintid = $(this).data("sprintid"); var start = new Date(picker.startDate.format(‘YYYY-MM-DD’)); var end = new Date(picker.endDate.format(‘YYYY-MM-DD’)); var ..

Read more

I need to set the start date and enable date selection for the end date automatically when the calendar show (daterangepicker). My code example: <script> var Sunday = “Sun”; var Monday =”Mon”; var Tuesday = “Tues”; var Wednesday = “Wed”; var Thursday = “Thu”; var Friday = “Fri”; var Saturday = “Sat”; var apply = ..

Read more