2015-11-27 20:37:51 +00:00
|
|
|
<!--
|
|
|
|
Open MCT Web, Copyright (c) 2014-2015, United States Government
|
|
|
|
as represented by the Administrator of the National Aeronautics and Space
|
|
|
|
Administration. All rights reserved.
|
|
|
|
|
|
|
|
Open MCT Web is licensed under the Apache License, Version 2.0 (the
|
|
|
|
"License"); you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0.
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
License for the specific language governing permissions and limitations
|
|
|
|
under the License.
|
|
|
|
|
|
|
|
Open MCT Web includes source code licensed under additional open source
|
|
|
|
licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
|
|
this source code distribution or the Licensing information page available
|
|
|
|
at runtime from the About dialog for additional information.
|
|
|
|
-->
|
2016-05-10 00:56:50 +00:00
|
|
|
<span ng-controller="DateTimeFieldController">
|
2015-10-27 19:56:08 +00:00
|
|
|
<input type="text"
|
|
|
|
ng-model="textValue"
|
2015-11-27 22:23:25 +00:00
|
|
|
ng-blur="restoreTextValue(); ngBlur()"
|
2016-07-12 17:08:08 +00:00
|
|
|
ng-mouseup="ngMouseup()"
|
2016-07-27 16:05:03 +00:00
|
|
|
ng-disabled="ngDisabled"
|
2016-01-11 23:29:43 +00:00
|
|
|
ng-class="{
|
2016-01-22 23:24:27 +00:00
|
|
|
error: textInvalid ||
|
|
|
|
(structure.validate &&
|
2016-05-10 00:56:50 +00:00
|
|
|
!structure.validate(ngModel[field])),
|
|
|
|
'picker-icon': structure.format === 'utc' || !structure.format
|
2016-01-11 23:29:43 +00:00
|
|
|
}">
|
2016-06-08 12:32:21 +00:00
|
|
|
</input>
|
|
|
|
<a class="ui-symbol icon icon-calendar"
|
|
|
|
ng-if="!picker.active && (structure.format === 'utc' || !structure.format)"
|
|
|
|
ng-click="picker.active = !picker.active"></a>
|
|
|
|
<!-- If picker active show icon with no onclick to prevent double registration of clicks -->
|
|
|
|
<a class="ui-symbol icon icon-calendar" ng-if="picker.active"></a>
|
2015-11-12 22:49:19 +00:00
|
|
|
<mct-popup ng-if="picker.active">
|
|
|
|
<div mct-click-elsewhere="picker.active = false">
|
2015-10-27 19:56:08 +00:00
|
|
|
<mct-control key="'datetime-picker'"
|
2015-11-25 19:16:31 +00:00
|
|
|
ng-model="pickerModel"
|
2016-05-11 18:32:39 +00:00
|
|
|
field="'value'">
|
2015-10-27 19:56:08 +00:00
|
|
|
</mct-control>
|
|
|
|
</div>
|
|
|
|
</mct-popup>
|
|
|
|
</span>
|