From 053c47499ee00c984f85ee83bcb389175b0b11ea Mon Sep 17 00:00:00 2001 From: hex0id Date: Tue, 4 Aug 2015 06:31:19 -0400 Subject: [PATCH 1/2] Fix datefield to work with other form markup Changed onClick selector to catch any date field, so it will work with "nonstandard" form markups like adding new lines from https://github.com/silverstripe-australia/silverstripe-gridfieldextensions --- javascript/DateField.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/DateField.js b/javascript/DateField.js index ceb54df4c..d12d32ce7 100644 --- a/javascript/DateField.js +++ b/javascript/DateField.js @@ -26,7 +26,7 @@ } }); - $(document).on("click", ".field.date input.text,.fieldholder-small input.text.date", function() { + $(document).on("click", "input.text.date", function() { $(this).ssDatepicker(); if($(this).data('datepicker')) { From d678cfc1d17bb4ec8570bb2672064e60a57cebee Mon Sep 17 00:00:00 2001 From: hex0id Date: Thu, 27 Aug 2015 16:50:25 -0400 Subject: [PATCH 2/2] Update DateField.js change selector to preserve backwards compatibility --- javascript/DateField.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/DateField.js b/javascript/DateField.js index d12d32ce7..deeed7feb 100644 --- a/javascript/DateField.js +++ b/javascript/DateField.js @@ -26,7 +26,7 @@ } }); - $(document).on("click", "input.text.date", function() { + $(document).on("click", ".field.date input.text,input.text.date", function() { $(this).ssDatepicker(); if($(this).data('datepicker')) {