bootstrap datepicker can be less than start date
JavaScript
function populateEndDate() {
var date2 = $('#dateStart').datepicker('getDate');
date2.setDate(date2.getDate() + 1);
$('#dateEnd').datepicker('setDate', date2);
$("#dateEnd").datepicker("option", "minDate", date2);
}
$(document).ready(function() {
$("#dateStart").datepicker({
dateFormat: "dd-M-yy",
minDate: 'dateToday',
onSelect: function(date) {
populateEndDate();
}
}).datepicker("setDate", new Date());
$('#dateEnd').datepicker({
dateFormat: "dd-M-yy",
minDate: 1,
onClose: function() {
var dt1 = $('#dateStart').datepicker('getDate');
var dt2 = $('#dateEnd').datepicker('getDate');
if (dt2 <= dt1) {
var minDate = $('#dateEnd').datepicker('option', 'minDate');
$('#dateEnd').datepicker('setDate', minDate);
}
}
}).datepicker("setDate", new Date());
});
Also in JavaScript:
- Title
- c# parse json
- Category
- JavaScript
- Title
- forever loop in js
- Category
- JavaScript
- Title
- how to get last item in array javascript
- Category
- JavaScript
- Title
- create an element jquery
- Category
- JavaScript
- Title
- ad data to js object
- Category
- JavaScript
- Title
- bookshelf insert multiple rows
- Category
- JavaScript
- Title
- boucle for in js
- Category
- JavaScript
- Title
- how to get a random element of an array javascript
- Category
- JavaScript
- Title
- bind in javascript
- Category
- JavaScript
- Title
- how to count click events javascript
- Category
- JavaScript
- Title
- angular material theme colors
- Category
- JavaScript
- Title
- color js
- Category
- JavaScript
- Title
- how to map over arrays vuejs
- Category
- JavaScript
- Title
- compare two arrays javascript
- Category
- JavaScript
- Title
- filereader javascript example
- Category
- JavaScript
- Title
- accept 2 values after decimal in angular forms
- Category
- JavaScript
- Title
- bind jquery trough name
- Category
- JavaScript
- Title
- hashing in javascript
- Category
- JavaScript
- Title
- access angular app outside localhost
- Category
- JavaScript
- Title
- append item to array javascript
- Category
- JavaScript
- Title
- email regex javascript
- Category
- JavaScript
- Title
- choose random from array javascript
- Category
- JavaScript
- Title
- change width in js
- Category
- JavaScript
- Title
- how to remove duplicate array object in javascript
- Category
- JavaScript
- Title
- ajax open a request
- Category
- JavaScript
- Title
- concat js mdn
- Category
- JavaScript
- Title
- event handler attachment jquery
- Category
- JavaScript
- Title
- create element javascript with class
- Category
- JavaScript
- Title
- .change() in pure js
- Category
- JavaScript
- Title
- html inline javascript
- Category
- JavaScript
- Title
- how to get last string in javascript
- Category
- JavaScript
- Title
- express bodyparser deprecated
- Category
- JavaScript
- Title
- Error: Can't resolve 'fs' webpack
- Category
- JavaScript
- Title
- javascript check if two date are ugual
- Category
- JavaScript
- Title
- class component react
- Category
- JavaScript
- Title
- go to page jquery
- Category
- JavaScript
- Title
- how to check string uppercase or lowersace using regex javascript
- Category
- JavaScript
- Title
- arrow function javascript ie11
- Category
- JavaScript
- Title
- firefox extension make ajax request
- Category
- JavaScript
- Title
- array sort by key javascript
- Category
- JavaScript
- Title
- append new element for each value in array d3.js
- Category
- JavaScript
- Title
- how to assign onEdit to specigfic tab
- Category
- JavaScript
- Title
- Find channel discord js
- Category
- JavaScript
- Title
- google sign in in firebase react
- Category
- JavaScript
- Title
- angular transition animation
- Category
- JavaScript
- Title
- append element javascript
- Category
- JavaScript
- Title
- how to access child img src in jquery
- Category
- JavaScript
- Title
- convert string to char array javascript
- Category
- JavaScript
- Title
- events js 292 throw er Unhandled 'error' event ^ Error getaddrinfo ENOTFOUND x86_64-apple-darwin13.4.0 at GetAddrInfoReqWrap.onlookup [as oncomplete]
- Category
- JavaScript
- Title
- javascript change attribute
- Category
- JavaScript
- Title
- electron Uncaught ReferenceError: require is not defined at recorder.js:1
- Category
- JavaScript
- Title
- interceptor in angular 8
- Category
- JavaScript
- Title
- dynamic loaded content can't find library jqury
- Category
- JavaScript
- Title
- how to remove link in image in jquery
- Category
- JavaScript
- Title
- document ready
- Category
- JavaScript
- Title
- angular submit form programmatically
- Category
- JavaScript
- Title
- https package node post request
- Category
- JavaScript
- Title
- find substring in string javascript
- Category
- JavaScript
- Title
- how to create a server in node js
- Category
- JavaScript
- Title
- for loop js example
- Category
- JavaScript
- Title
- How to make a function run only after 2 events has triggered js
- Category
- JavaScript
- Title
- fetch a json from url python
- Category
- JavaScript
- Title
- defineCall is not a function at Sequelize.import sequelize.js
- Category
- JavaScript
- Title
- how to limit input type max length
- Category
- JavaScript
- Title
- function prototype javascript
- Category
- JavaScript
- Title
- check element exist in jquery
- Category
- JavaScript
- Title
- javascript add multiple items to array
- Category
- JavaScript
- Title
- get current time epoch javascript
- Category
- JavaScript
- Title
- Javascript - Track mouse position
- Category
- JavaScript
- Title
- ellipsis javascript
- Category
- JavaScript
- Title
- convert number to k m b javascript
- Category
- JavaScript
- Title
- document get element by tag
- Category
- JavaScript
- Title
- data binding on checkbox angular
- Category
- JavaScript
- Title
- d3js circle out of scrren
- Category
- JavaScript
- Title
- javascript change url without reload
- Category
- JavaScript
- Title
- express ejs
- Category
- JavaScript
- Title
- how to check reactjs version in command prompt
- Category
- JavaScript
- Title
- how to change color of font in js
- Category
- JavaScript
- Title
- format number thousands k javascript
- Category
- JavaScript
- Title
- array in javascript
- Category
- JavaScript
- Title
- how to return the number of nodes in a linked list
- Category
- JavaScript
- Title
- increase-memory-limit not working node
- Category
- JavaScript
- Title
- javascript button onclick programmatically
- Category
- JavaScript
- Title
- currying in javascript
- Category
- JavaScript
- Title
- device height react native
- Category
- JavaScript
- Title
- how to draw a flower in javascript
- Category
- JavaScript
- Title
- axios js and react
- Category
- JavaScript
- Title
- call javascript function from html
- Category
- JavaScript
- Title
- angular reactive forms
- Category
- JavaScript
- Title
- ignore node modules
- Category
- JavaScript
- Title
- how to add multiple videos in html5 with javascript
- Category
- JavaScript
- Title
- angular generate component
- Category
- JavaScript
- Title
- get value of checked radio button jquery
- Category
- JavaScript
- Title
- discord.js multiple embeds
- Category
- JavaScript
- Title
- angular ngclass
- Category
- JavaScript
- Title
- how to create a new react native project
- Category
- JavaScript
- Title
- how to create 3d gallery using javascript
- Category
- JavaScript
- Title
- javascript all type of data
- Category
- JavaScript
- Title
- floor in js
- Category
- JavaScript
- Title
- angular email validation
- Category
- JavaScript