From bbecfe4552debbe2a2fd36b0bc762792d9094106 Mon Sep 17 00:00:00 2001 From: Divya Date: Tue, 9 Aug 2016 15:16:34 -0500 Subject: [PATCH] #141:IE required error message appears by loading of the page issue fix: Added lable attribute to mdp date and time pickers to replace placeholder, as placeholder is having validation error messages issues in IE browser. --- src/components/mdpDatePicker/mdpDatePicker.js | 10 ++++++---- src/components/mdpTimePicker/mdpTimePicker.js | 8 +++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/mdpDatePicker/mdpDatePicker.js b/src/components/mdpDatePicker/mdpDatePicker.js index a4301812..ca422d3c 100644 --- a/src/components/mdpDatePicker/mdpDatePicker.js +++ b/src/components/mdpDatePicker/mdpDatePicker.js @@ -328,14 +328,16 @@ module.directive("mdpDatePicker", ["$mdpDatePicker", "$timeout", function($mdpDa template: function(element, attrs) { var noFloat = angular.isDefined(attrs.mdpNoFloat), placeholder = angular.isDefined(attrs.mdpPlaceholder) ? attrs.mdpPlaceholder : "", - openOnClick = angular.isDefined(attrs.mdpOpenOnClick) ? true : false; - + openOnClick = angular.isDefined(attrs.mdpOpenOnClick) ? true : false, + label = angular.isDefined(attrs.mdpLabel) ? attrs.mdpLabel : ""; + return '
' + - '' + + '' + '' + '' + '' + - '' + + (label ? '' : '')+ + '' + '' + '
'; }, diff --git a/src/components/mdpTimePicker/mdpTimePicker.js b/src/components/mdpTimePicker/mdpTimePicker.js index 249ea008..413a3a5e 100644 --- a/src/components/mdpTimePicker/mdpTimePicker.js +++ b/src/components/mdpTimePicker/mdpTimePicker.js @@ -248,14 +248,16 @@ module.directive("mdpTimePicker", ["$mdpTimePicker", "$timeout", function($mdpTi template: function(element, attrs) { var noFloat = angular.isDefined(attrs.mdpNoFloat), placeholder = angular.isDefined(attrs.mdpPlaceholder) ? attrs.mdpPlaceholder : "", - openOnClick = angular.isDefined(attrs.mdpOpenOnClick) ? true : false; + openOnClick = angular.isDefined(attrs.mdpOpenOnClick) ? true : false, + label = angular.isDefined(attrs.mdpLabel) ? attrs.mdpLabel : ""; return '
' + - '' + + '' + '' + '' + '' + - '' + + (label ? '' : '')+ + '' + '' + '
'; },