File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 18231823 return String ( hour ) ;
18241824 } ;
18251825
1826+ var computeEffectiveSetting = function ( settings , property ) {
1827+ return settings && settings [ property ] ? settings [ property ] : $ . timepicker . _defaults [ property ] ;
1828+ } ;
1829+
18261830 /*
18271831 * Splits datetime string into date and time substrings.
18281832 * Throws exception when date can't be parsed
18321836 try {
18331837 // The idea is to get the number separator occurrences in datetime and the time format requested (since time has
18341838 // fewer unknowns, mostly numbers and am/pm). We will use the time pattern to split.
1835- var separator = timeSettings && timeSettings . separator ? timeSettings . separator : $ . timepicker . _defaults . separator ,
1836- format = timeSettings && timeSettings . timeFormat ? timeSettings . timeFormat : $ . timepicker . _defaults . timeFormat ,
1839+ var separator = computeEffectiveSetting ( timeSettings , ' separator' ) ,
1840+ format = computeEffectiveSetting ( timeSettings , ' timeFormat' ) ,
18371841 timeParts = format . split ( separator ) , // how many occurrences of separator may be in our format?
18381842 timePartsLen = timeParts . length ,
18391843 allParts = dateTimeString . split ( separator ) ,
You can’t perform that action at this time.
0 commit comments