summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-08-08 11:09:17 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-08-08 11:09:41 +0200
commit55a17a2b23ab9c720eb26f54db4048af22aa59bb (patch)
tree4417968afa2f8d83a1f4eae61111ea3f229cf2ee
parentfa260b1649e200a0e6a4d3d921bcf22c414d4824 (diff)
downloadnextcloud-server-55a17a2b23ab9c720eb26f54db4048af22aa59bb.tar.gz
nextcloud-server-55a17a2b23ab9c720eb26f54db4048af22aa59bb.zip
set minDate always to today + one day
-rw-r--r--core/js/share.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 1b4e519f201..eceb6b98f1e 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -724,8 +724,11 @@ OC.Share={
*/
showExpirationDate:function(date, shareTime) {
var now = new Date();
+ // min date should always be the next day
+ var minDate = new Date();
+ minDate.setDate(minDate.getDate()+1);
var datePickerOptions = {
- minDate: now,
+ minDate: minDate,
maxDate: null
};
if (_.isNumber(shareTime)) {
@@ -757,6 +760,9 @@ OC.Share={
$(document).ready(function() {
if(typeof monthNames != 'undefined'){
+ // min date should always be the next day
+ var minDate = new Date();
+ minDate.setDate(minDate.getDate()+1);
$.datepicker.setDefaults({
monthNames: monthNames,
monthNamesShort: $.map(monthNames, function(v) { return v.slice(0,3)+'.'; }),
@@ -764,7 +770,7 @@ $(document).ready(function() {
dayNamesMin: $.map(dayNames, function(v) { return v.slice(0,2); }),
dayNamesShort: $.map(dayNames, function(v) { return v.slice(0,3)+'.'; }),
firstDay: firstDay,
- minDate : new Date()
+ minDate : minDate
});
}
$(document).on('click', 'a.share', function(event) {