Skip to content
This repository was archived by the owner on Feb 14, 2019. It is now read-only.

Commit 5521adf

Browse files
author
Christian Vaas
committed
Added "t" as a format option. Gets replaced with the milliseconds since the epoch, such as is returned by Date.getTime()
1 parent 08e35e8 commit 5521adf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

js/bootstrap-datetimepicker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1452,7 +1452,7 @@
14521452
},
14531453
validParts: function (type) {
14541454
if (type == 'standard') {
1455-
return /hh?|HH?|p|P|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;
1455+
return /t|hh?|HH?|p|P|ii?|ss?|dd?|DD?|mm?|MM?|yy(?:yy)?/g;
14561456
} else if (type == 'php') {
14571457
return /[dDjlNwzFmMnStyYaABgGhHis]/g;
14581458
} else {
@@ -1614,6 +1614,7 @@
16141614
var val;
16151615
if (type == 'standard') {
16161616
val = {
1617+
t: date.getTime(),
16171618
// year
16181619
yy: date.getUTCFullYear().toString().substring(2),
16191620
yyyy: date.getUTCFullYear(),

0 commit comments

Comments
 (0)