aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/lib/ui.js4
-rw-r--r--views/default/input/date.php1
2 files changed, 3 insertions, 2 deletions
diff --git a/js/lib/ui.js b/js/lib/ui.js
index 166ca16bc..6cc1bc78a 100644
--- a/js/lib/ui.js
+++ b/js/lib/ui.js
@@ -267,8 +267,8 @@ elgg.ui.initDatePicker = function() {
onSelect: function(dateText) {
if ($(this).is('.elgg-input-timestamp')) {
// convert to unix timestamp
- var date = $.datepicker.parseDate('yy-mm-dd', dateText);
- var timestamp = $.datepicker.formatDate('@', date);
+ var dateParts = dateText.split("-");
+ var timestamp = Date.UTC(dateParts[0], dateParts[1] - 1, dateParts[2]);
timestamp = timestamp / 1000;
var id = $(this).attr('id');
diff --git a/views/default/input/date.php b/views/default/input/date.php
index 35a951a0b..ceeb2105c 100644
--- a/views/default/input/date.php
+++ b/views/default/input/date.php
@@ -44,6 +44,7 @@ if ($timestamp) {
$vars['class'] = "{$vars['class']} elgg-input-timestamp";
$vars['id'] = $vars['name'];
unset($vars['name']);
+ unset($vars['internalname']);
}
// convert timestamps to text for display