diff --git a/index2.html b/index2.html
new file mode 100644
index 0000000..bb3725f
--- /dev/null
+++ b/index2.html
@@ -0,0 +1,45 @@
+
+
+
+ Sample datepickrs
+
+
+
+
+
+ datepickr examples
+
+
+
+
+
+
+
+
diff --git a/src/datepickr.js b/src/datepickr.js
index deb3d52..d15ecb8 100644
--- a/src/datepickr.js
+++ b/src/datepickr.js
@@ -54,6 +54,7 @@ datepickr.init = function (element, instanceConfig) {
dateFormat: 'F j, Y',
altFormat: null,
altInput: null,
+ altInputCallback: null,
minDate: null,
maxDate: null,
shorthandCurrentMonth: false
@@ -346,6 +347,9 @@ datepickr.init = function (element, instanceConfig) {
// I don't know why someone would want to do this... but just in case?
self.config.altInput.value = formatDate(self.config.dateFormat, currentTimestamp);
}
+ if(self.config.altInputCallback){
+ self.config.altInputCallback(self.config.altInput.value);
+ }
}
self.element.value = formatDate(self.config.dateFormat, currentTimestamp);