yscoder / Calendar

A calendar picker component, based on jQuery.
49 stars 33 forks source link

How to make two inputs of range date-piacker. #1

Closed keem1201 closed 8 years ago

keem1201 commented 8 years ago

Here I would like to have two inputs of range date-piacker. For example; when I already selected a check-in date, it will automatically force me to select a check-out date.

Thanks Hakeem

yscoder commented 8 years ago

Do you want to select a date range? I think you need to use two date picker to complete.

keem1201 commented 8 years ago

Yes. Can you help me coding it? Thanks

yscoder commented 8 years ago

I guess, you want to see in the view select the date range. The following code only shows the results of two separate selection. Maybe not what you want.

<input type="text" id="startDate">
<div id="dt1"></div>

<input type="text" id="endDate">
<div id="dt2"></div>
$('#startDate').calendar({
    trigger: '#dt1',
    zIndex: 999
});

$('#endDate').calendar({
    trigger: '#dt2',
    zIndex: 999
});
keem1201 commented 8 years ago

Thanks