Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ng-dirty class for a control that was not touched
Message
 
 
General information
Forum:
Javascript
Category:
Other
Miscellaneous
Thread ID:
01616375
Message ID:
01616491
Views:
21
>>>How about the template ?
>>
>>
>>@using Siriusware.Resources;
>><div class="input-group">
>>    <input type="text" autocomplete="off" id="{{name}}" name="{{name}}" class="form-control" placeholder="{{placeholder}}" />
>>    <span class="input-group-addon datepickerbutton">
>>        <!--datepickerbutton:jquery datetimepicker plugin requires this class-->
>>        <i class="fa fa-calendar"></i>
>>    </span>
>>    <span class="input-group-addon datetimepicker-input-addon-button" ng-if="showBod" ng-click='setBod()'><i class="fa fa-sun-o"></i></span>
>>    <span class="input-group-addon datetimepicker-input-addon-button" ng-if="showEod" ng-click='setEod()'><i class="fa fa-moon-o"></i></span>
>>    <span class="input-group-addon datetimepicker-input-addon-button" ng-if="showNow" ng-click='setNow()'>@Labels.now</span>
>></div>
>><div class="field-validation-error">
>>    <span ng-show="!validStartDateRange()">@Messages.invalidStartDate</span>
>>    <span ng-show="!validEndDateRange()">@Messages.invalidEndDate</span>
>>    <span ng-show="!validRequired()">@String.Format(Messages.isRequired, Labels.date)</span>
>>    <span ng-show="!validFutureDate()">@Messages.invalidFutureDate</span>
>>    <span ng-show="!validPastDate()">@Messages.invalidPastDate</span>
>></div>
>
>Hmm. Not much help - it links to a ton of other stuff I haven't got so I can't reproduce.
>
>You could try putting a $watch on form.$dirty - if you break there the stack trace may provide clues as to where this is happening.....

I've been tracing the code and I see what is happening - in the angularjs watch check the value is 2000-12-15 00.00.000 and it's compared with 2000-12-15T00.00 and so the values are not the same.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform