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.

  1. 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'        }      ];}); 
  2. view retrieve array ng-options="hour.name hour.name hour in hours".

my questions are:

  1. how can block user selected timeslots using angular?
  2. is possible keep code skinny on backend, or better sort such things on server?

  3. what way efficient?

cheers.


Comments

Popular posts from this blog

mysql - How to unscape text from database in android studio -

php - Admin SDK -- get information about the group -

Making CSS Drop Down Menu 2 Columns -