Skip to content

Instantly share code, notes, and snippets.

@Kcko
Created December 10, 2019 11:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kcko/aad5f43d673aa09c868f0f83aeb764bb to your computer and use it in GitHub Desktop.
Save Kcko/aad5f43d673aa09c868f0f83aeb764bb to your computer and use it in GitHub Desktop.
// @link: https://forum.nette.org/cs/32804-vyvolani-toggle-pri-zavreni-bootstrap-datepicker
$(':text[data-provide="datepicker"]').datepicker({
language: 'cs'
})
.on('hide', function(e) {
// `e` here contains the extra attributes
var defaultValue = e.currentTarget.defaultValue;
var value = e.currentTarget.value;
if(defaultValue == value) {
Nette.toggle('submit-container', false);
} else {
Nette.toggle('submit-container', true);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment