javascript - disable selected timeslots using angularjs -
the idea user selects date calendar, available time slots displayed, , upon selecting available timeslot, time slot blocked cancel duplicate timeslot selection, , added database. using mvc.net, webapi, entityframework , angularjs.
my time slots array:
$("input").click(function () { $('.datepicker').pickadate() $scope.hours = {}; $scope.hours = [ { id: 1, name: '12:00' }, { id: 2, name: '13:00' }, { id: 3, name: '14:00' }, { id: 4, name: '15:00' }, { id: 5, name: '16:00' }, { id: 6, name: '17:00' }, { id: 7, name: '18:00' }, { id: 8, name: '19:00' }, { id: 9, name: '20:00' }, { id: 10, name: '21:00' }, { id: 11, name: '22:00' } ];});
view retrieve array ng-options="hour.name hour.name hour in hours".
my questions are:
- how can block user selected timeslots using angular?
is possible keep code skinny on backend, or better sort such things on server?
what way efficient?
cheers.
Comments
Post a Comment