jQuery DateRangePicker - When changing start date, the end date also changes - why? The Next CEO of Stack OverflowHow to change the href for a hyperlink using jQueryWhy would a JavaScript variable start with a dollar sign?How do I pre-populate a jQuery Datepicker textbox with today's date?Change the selected value of a drop-down list with jQueryChange the image source on rollover using jQueryDetect all changes to a <input type=“text”> (immediately) using JQueryjQuery AJAX submit formIs Safari on iOS 6 caching $.ajax results?Why does my JavaScript get a “No 'Access-Control-Allow-Origin' header is present on the requested resource” error when Postman does not?Single calendar with start and End Data Jquery DateRangePicker
Are there any limitations on attacking while grappling?
Would a galaxy be visible from outside, but nearby?
How do we know the LHC results are robust?
What flight has the highest ratio of time difference to flight time?
Why do remote companies require working in the US?
What happens if you roll doubles 3 times then land on "Go to jail?"
What's the best way to handle refactoring a big file?
Is it professional to write unrelated content in an almost-empty email?
Skipping indices in a product
Can we say or write : "No, it'sn't"?
How to count occurrences of text in a file?
Why does the UK parliament need a vote on the political declaration?
Is it my responsibility to learn a new technology in my own time my employer wants to implement?
Why do airplanes bank sharply to the right after air-to-air refueling?
Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?
Is there a way to save my career from absolute disaster?
What benefits would be gained by using human laborers instead of drones in deep sea mining?
Is it ever safe to open a suspicious html file (e.g. email attachment)?
Unreliable Magic - Is it worth it?
Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis
Why do we use the plural of movies in this phrase "We went to the movies last night."?
What was the first Unix version to run on a microcomputer?
Do I need to enable Dev Hub in my PROD Org?
Would this house-rule that treats advantage as a +1 to the roll instead (and disadvantage as -1) and allows them to stack be balanced?
jQuery DateRangePicker - When changing start date, the end date also changes - why?
The Next CEO of Stack OverflowHow to change the href for a hyperlink using jQueryWhy would a JavaScript variable start with a dollar sign?How do I pre-populate a jQuery Datepicker textbox with today's date?Change the selected value of a drop-down list with jQueryChange the image source on rollover using jQueryDetect all changes to a <input type=“text”> (immediately) using JQueryjQuery AJAX submit formIs Safari on iOS 6 caching $.ajax results?Why does my JavaScript get a “No 'Access-Control-Allow-Origin' header is present on the requested resource” error when Postman does not?Single calendar with start and End Data Jquery DateRangePicker
When I change the start date, the end date on my calendar changes to be the same. I want the start date to have no effect on the end date.

<input id="date" name="range">
$(function() $("#date").daterangepicker(); );
javascript jquery
add a comment |
When I change the start date, the end date on my calendar changes to be the same. I want the start date to have no effect on the end date.

<input id="date" name="range">
$(function() $("#date").daterangepicker(); );
javascript jquery
It is not clear what you mean. You need two fields if you want a range
– mplungjan
Mar 21 at 17:02
1
It's just setting a default value for the second date as it can't be any earlier than the start date.
– danmullen
Mar 21 at 17:04
may be you should try the predefined custom arge daterangepicker.com/#example4
– zod
Mar 21 at 17:07
Can you clarify exactly what you're trying to achieve as it's not clear from your explanation..
– DomBurf
Mar 21 at 17:27
add a comment |
When I change the start date, the end date on my calendar changes to be the same. I want the start date to have no effect on the end date.

<input id="date" name="range">
$(function() $("#date").daterangepicker(); );
javascript jquery
When I change the start date, the end date on my calendar changes to be the same. I want the start date to have no effect on the end date.

<input id="date" name="range">
$(function() $("#date").daterangepicker(); );
javascript jquery
javascript jquery
edited Mar 21 at 17:48
Levande
216
216
asked Mar 21 at 17:00
ammarammar
1
1
It is not clear what you mean. You need two fields if you want a range
– mplungjan
Mar 21 at 17:02
1
It's just setting a default value for the second date as it can't be any earlier than the start date.
– danmullen
Mar 21 at 17:04
may be you should try the predefined custom arge daterangepicker.com/#example4
– zod
Mar 21 at 17:07
Can you clarify exactly what you're trying to achieve as it's not clear from your explanation..
– DomBurf
Mar 21 at 17:27
add a comment |
It is not clear what you mean. You need two fields if you want a range
– mplungjan
Mar 21 at 17:02
1
It's just setting a default value for the second date as it can't be any earlier than the start date.
– danmullen
Mar 21 at 17:04
may be you should try the predefined custom arge daterangepicker.com/#example4
– zod
Mar 21 at 17:07
Can you clarify exactly what you're trying to achieve as it's not clear from your explanation..
– DomBurf
Mar 21 at 17:27
It is not clear what you mean. You need two fields if you want a range
– mplungjan
Mar 21 at 17:02
It is not clear what you mean. You need two fields if you want a range
– mplungjan
Mar 21 at 17:02
1
1
It's just setting a default value for the second date as it can't be any earlier than the start date.
– danmullen
Mar 21 at 17:04
It's just setting a default value for the second date as it can't be any earlier than the start date.
– danmullen
Mar 21 at 17:04
may be you should try the predefined custom arge daterangepicker.com/#example4
– zod
Mar 21 at 17:07
may be you should try the predefined custom arge daterangepicker.com/#example4
– zod
Mar 21 at 17:07
Can you clarify exactly what you're trying to achieve as it's not clear from your explanation..
– DomBurf
Mar 21 at 17:27
Can you clarify exactly what you're trying to achieve as it's not clear from your explanation..
– DomBurf
Mar 21 at 17:27
add a comment |
1 Answer
1
active
oldest
votes
If you set up your calendar as in the jQuery docs, you wont have this issue - you need two separate inputs for the date range:
https://jqueryui.com/datepicker/#date-range
Currently it appears to be changing the end date so it is no earlier than the start date range.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55285614%2fjquery-daterangepicker-when-changing-start-date-the-end-date-also-changes-w%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you set up your calendar as in the jQuery docs, you wont have this issue - you need two separate inputs for the date range:
https://jqueryui.com/datepicker/#date-range
Currently it appears to be changing the end date so it is no earlier than the start date range.
add a comment |
If you set up your calendar as in the jQuery docs, you wont have this issue - you need two separate inputs for the date range:
https://jqueryui.com/datepicker/#date-range
Currently it appears to be changing the end date so it is no earlier than the start date range.
add a comment |
If you set up your calendar as in the jQuery docs, you wont have this issue - you need two separate inputs for the date range:
https://jqueryui.com/datepicker/#date-range
Currently it appears to be changing the end date so it is no earlier than the start date range.
If you set up your calendar as in the jQuery docs, you wont have this issue - you need two separate inputs for the date range:
https://jqueryui.com/datepicker/#date-range
Currently it appears to be changing the end date so it is no earlier than the start date range.
answered Mar 21 at 17:04
LevandeLevande
216
216
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55285614%2fjquery-daterangepicker-when-changing-start-date-the-end-date-also-changes-w%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It is not clear what you mean. You need two fields if you want a range
– mplungjan
Mar 21 at 17:02
1
It's just setting a default value for the second date as it can't be any earlier than the start date.
– danmullen
Mar 21 at 17:04
may be you should try the predefined custom arge daterangepicker.com/#example4
– zod
Mar 21 at 17:07
Can you clarify exactly what you're trying to achieve as it's not clear from your explanation..
– DomBurf
Mar 21 at 17:27