0

I have an input field where i am using kendo datepicker this field is not required and user can not remove value from input but can change from the datepicker , So IE there is 'x' icon user able to remove the value from the input and that is disabling the form and not enabling even you select values again.

So i am looking for two solutions.

1- How to remove 'x' icon from the input in IE ? 2- How to keep Save button enable even value is not there because its not required field ?

main.html

 <form id="createRcsaFormName" name="createRcsaCycleForm" class="marginLeft10" novalidate
            k-validate-on-blur="false">

    <div class="col-md-5 changeWdh">
        <input type="text" class="form-control" name="opLossFromDate" id="opLossFromDate" kendo-date-picker
            ng-model="rcsaCycleDTO.opLossFromDate" 
            onkeydown="return false;" k-format="'MM/dd/yyyy'" k-max="'{{today}}'"
            ng-disabled="rcsaCycleDTO.cycStatLkupCode !== 'RA_CYC_SETUP'"
            ng-change="validateDate('opLossFromDate','opLossToDate')"/>
    </div>
    <p class="text-danger" ng-show="createRcsaCycleForm.opLossFromDate.$touched && createRcsaCycleForm.opLossFromDate.$error.required">OPLoss Validation Date is Required</p>

       <button class="btn btn-primary" ng-hide="editMode" type="button"  
                    ng-disabled="createRcsaCycleForm.$invalid || rcsaCycleDTO.cycStatLkupCode=='RA_CANCEL'"
                    ng-class="{disableSaveCls:createRcsaCycleForm.$invalid}"
                    ng-click="submit()">Save</button>
aftab
  • 693
  • 1
  • 12
  • 27
  • Possible duplicate of [Remove IE10's “clear field” X button on certain inputs?](http://stackoverflow.com/questions/14007655/remove-ie10s-clear-field-x-button-on-certain-inputs). The button question seems like a different question completely unrelated. – Hanlet Escaño Jan 26 '16 at 16:10
  • I am still trying to understand why its disabling the form. do you think problem related to 'x' icon ? – aftab Jan 26 '16 at 16:25
  • If I understand correctly, even though you are not making your field required, you are disabling the button if the _entire form_ is `$invalid`. So maybe this is the reason it is being disabled, because the state of the form is `$invalid` for some reason. So I guess the question is, would an _empty field_ qualify as _valid_? - Does this work in other browsers? (i.e. FireFox, Chrome, etc.) – Hanlet Escaño Jan 26 '16 at 16:30
  • I got you what you saying form will be disabled if the required fields are empty , other browser dont give option user to remove the value because 'x' icon is not there so user can only change the value from datepicker. It only happens when user do some action on input itself in IE. – aftab Jan 26 '16 at 16:40
  • So you could not get the 'x' button gone from the textbox with the link I gave you above? – Hanlet Escaño Jan 26 '16 at 16:41
  • that link worked but i am thinking other scenario too what if user want to remove value completely from the field it will disable the form again. – aftab Jan 26 '16 at 16:43
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/101698/discussion-between-hanlet-escano-and-aftab). – Hanlet Escaño Jan 26 '16 at 16:44

0 Answers0