Thank you Dinesh, these are the directives for the jqdatepickerin and
jqdatepicjkerout
i can't get the picked date , what's wrong could you help me to find out
why?
thanks a lot
Roberta
module.directive('jqdatepickerin', function () {
return {
restrict: 'A',
require: 'ngModel',
link: function (scope, element, attrs, ngModelCtrl) {
element.datepicker({
dateFormat: 'DD, d MM, yy',
onSelect: function (checkin) {
scope.date = checkin;
scope.$apply();
}
});
}
};
});
module.directive('jqdatepickerout', function () {
return {
restrict: 'A',
require: 'ngModel',
link: function (scope, element, attrs, ngModelCtrl) {
element.datepicker({
dateFormat: 'DD, d MM, yy',
onSelect: function (checkout) {
scope.date = checkout;
scope.$apply();
}
});
}
};
});
<div class="availabilityform"><div class="formelementfloat">checkin
</div><div class="formelementfloat"> <input type="text" ng-model="checkin"
jqdatepickerin name="checkin"/></div><div class="formelementfloat">checkout
</div> <div class="formelementfloat"><input type="text" ng-model="checkout"
jqdatepickerout name="checkout"/></div>
Il giorno martedì 9 settembre 2014 15:07:39 UTC+2, dinesh kumar ha scritto:
>
> hi roberta,
>
> I believe there is a problem in the *jqdatepickerin and jqdatepickerout *
> directive which doesn't update the model value(ng-model = "checkin").
>
> because in directive sometime you have to add scope.$apply for the model
> value to get updated.
>
> so the question is
>
> Did you write your own directive for jqdatepickerin and jqdatepickerout ?
> if so can you just share the directive code.
>
> or if you are using any plugins for jqdatepickerin and jqdatepickerout
> can you share URL or link of the plugin API.
>
> Thanks
> Dinesh kumar.L
>
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.