Skip to content

Instantly share code, notes, and snippets.

@mcabreradev
Created September 1, 2016 13:41
Show Gist options
  • Save mcabreradev/cc0b3ee450d15acb908bc900f97bcfde to your computer and use it in GitHub Desktop.
Save mcabreradev/cc0b3ee450d15acb908bc900f97bcfde to your computer and use it in GitHub Desktop.
Modernizr.js
<script>
(function($, Modernizr) {
if (!Modernizr.inputtypes.date) {
$('input[type=date]').bootstrapMaterialDatePicker({
format: 'YYYY-MM-DD',
time: false,
lang: 'es'
});
}
if (!Modernizr.inputtypes.time) {
$('input[type=time]').bootstrapMaterialDatePicker({
format: 'HH:mm',
date: false,
lang: 'es'
});
}
if (!Modernizr.inputtypes.datetime) {
$('input[type=datetime]').bootstrapMaterialDatePicker({
format: 'YYYY-MM-DD HH:mm:00',
lang: 'es'
});
}
})(window.jQuery, window.Modernizr);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment