Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 443 Vote(s) - 3.49 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bootstrap datepicker two way function

#1
I have a bootstrap datepicker I wanted to create a date range in one object only and triggered by pressing shift key and when the user clicked ctrl key the function will shift to multi dates is that possible? Sorry I am just a newbie in Javascript. Any help would be very much appreciated. Thank you so much!


Here is what I have so far.

<div class="col-xs-12">
<input class="form-control" type="text" id="multi" name="multi" required>
<div class="help-block with-errors"></div>
</div>

<script>
$('#multi').datepicker({
multidate: true,
format: 'mm-dd-yyyy',
forceParse: false

}).on('hide', function (e) {
e.stopPropagation();
})
</script>

$("#multi").on('keydown', function (event) {
if (event.shiftKey === true) {
isShift = true;
//alert(isShift);
console.log(isShift);
// isCtrl = false;
} else if (event.ctrlKey === true) {
//alert('ey ctrl press');
isCtrl = true;
console.log(isCtrl);
//isShift = false;
} else {

return false
}
});

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through