Created
March 9, 2015 11:13
-
-
Save althaus/72d91e6703b79cc2fddb to your computer and use it in GitHub Desktop.
Init datetimepicker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (scope.is('body') && locale != 'en') { | |
$.fn.datetimepicker.defaults.locale = locale; | |
} | |
/* Bind datetimepicker */ | |
var currentLocaleData = moment.localeData(); | |
$('.picker-datetime', scope).datetimepicker({ | |
format: currentLocaleData.longDateFormat('L') + ' ' + currentLocaleData.longDateFormat('LT'), | |
stepping: 5 | |
}); | |
$('.picker-date', scope).datetimepicker({ | |
format: currentLocaleData.longDateFormat('L') | |
}); | |
$('.picker-time', scope).datetimepicker({ | |
format: currentLocaleData.longDateFormat('LT'), | |
stepping: 5 | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment