Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to current date use for min date #52

Open
khushmohammad opened this issue Nov 11, 2019 · 1 comment
Open

how to current date use for min date #52

khushmohammad opened this issue Nov 11, 2019 · 1 comment

Comments

@khushmohammad
Copy link

how to current date use for min date

@khushmohammad
Copy link
Author

//i use like this .can you modify library today date
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth() + 1;
var yyyy = today.getFullYear();
if (dd < 10) {
dd = '0' + dd;
}
if (mm < 10) {
mm = '0' + mm;
}
var today = dd + '/' + mm + '/' + yyyy;
///
function datepicker(id){

$('#'+id).datepicker({ gainFocusOnConstruction: false, markup: 'bootstrap4',
outputFormat: 'dd/MM/yyyy',
max: today,
});
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant