ion-datetime-picker
ion-datetime-picker copied to clipboard
disable the date selection
is it posible to disbale the date selection something like ng-disabled="true".
Hi there,
currently it isn't, just use ng-if
instead.
What is your use-case for that? Would it be better for you to disable all fields in the picker or disable showing it altogether?
my use-case is something like when user is only in view mode then calendar popup should not appear.
Thanks, I'll add something for that use case in the next version. For now, just use two ng-if
s or an ng-switch
.
OK, thanks for your reply, really appreciate that.
Oh, I've just remembered that there is a fork that added this functionality to the current version. If you use JahaScript/ion-datetime-picker#0965c69fc0971901f968489cb721f1d0ee294c6a
in your package.json
or bower.json
, you get new attribute read-only
, used with boolean value: read-only="isReadOnly"
(with $scope.isReadOnly = true;
or false;
)
Thanks @katemihalikova