我有一个html5日期时间选择器。现在从日期选择器鼠标点击(选择)日期我想调用一个函数。我想知道我们怎么能在角度js中做到这一点... can 有人帮助我。
HTML:
<div class="col-lg-4">
<input class="form-control" type="datetime" date-time auto-close="true" view="date"
min-view="date" format="dd/MM/yyyy" ng-model="$root.Details.date" value = "{{dob}}">
</div>
的js
class CreateCustomerCtrl {
constructor($scope,$rootScope,$http,$state,$reactive,$timeout,Notification)
{
//logic here
}
export default angular.module('createCustomer', [
angularMeteor
])
.component('newCustomer', {
templateUrl: 'client/customer/new-customer.html',
controller:['$scope','$rootScope','$http','$state','$reactive','$timeout','Notification'
,customerCtrl]});
答案 0 :(得分:0)
您可以使用ng-model="myDate"
事件输入CustomView.h
self.textField.isAccessibilityElement = YES;
self.textField.floatingLabel.isAccessibilityElement = YES;
// CGRect textFieldFrame = self.textField.frame - self.textField.floatingLabel.frame;
CGRect textFieldFrame = CGRectMake(0, self.textField.floatingLabel.frame.size.height, self.textField.frame.size.width, self.textField.frame.size.height - self.textField.floatingLabel.frame.size.height);
textFieldElement.accessibilityFrame = [self convertRect:textFieldFrame toView:nil];
textFieldElement.accessibilityIdentifier = @"TextField";
textFieldElement.accessibilityLabel = @"text field";
[self.accessibleElements addObject:textFieldElement];
来获取绑定值,使用内部函数可以放置逻辑。