Skip to content

Instantly share code, notes, and snippets.

@reachkamrul
Last active August 26, 2021 08:19
Show Gist options
  • Save reachkamrul/6d86bb8eb76c6934e23a6c826c9cc7fb to your computer and use it in GitHub Desktop.
Save reachkamrul/6d86bb8eb76c6934e23a6c826c9cc7fb to your computer and use it in GitHub Desktop.
{
onChange: function(selectedDate) {
var date = selectedDate[0] ;
date.setDate(date.getDate()+2);
const fp = flatpickr('.set_date', {
disableMobile: "true",
dateFormat: "d-M-y"
});
fp.setDate(date)
}
}
// add this class 'set_date' to second date picker
//ios device fix
// add this css to your forms custom css
.flatpickr-monthDropdown-months {
-webkit-appearance: none !important;
-webkit-border-radius: 0px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment