Datepicker not working fully

Im having hard time making this Datepicker works in all my fields
It works only in one field if try to do the same in another it doesnt appear

default.ctp

 <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
 <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
 <script>
 $(function() {
   $(".datepicker").datepicker(
    {
                       dateFormat: 'dd-mm-yy',
                       onSelect: function(dateText, inst){
                             $('#select_date').val(dateText);
                             $("#datepicker").datepicker("destroy");
                      }
    }
   );
  });
 </script>    

add.ctp

 echo $this->Form->input('support_start_date',  array(
       'id'=>'datepicker',
       'type'=>'text'
    ), ['empty' => true]);
        echo $this->Form->input('end_date_support', array(
       'id'=>'datepicker',
       'type'=>'text'
    ), ['empty' => true]);

Here it works on support_start_date
But when I try to do the same on end_date_support it doesn’t show at all

ContactTable.php

   $validator
        ->dateTime('support_start_date')
        ->allowEmpty('support_start_date');

    $validator
        ->dateTime('end_date_support')
        ->allowEmpty('end_date_support');

you can not have two input fields with the same id (datepicker)

I tried this way but not work

 echo $this->Form->input('end_date_support',  array(
        'class'=>'datepicker',
       'type'=>'text'
    ), ['empty' => true]);

you should have 2 datepickers in your javascript also corresponding with the the id-s of the inputs

Honestly some exemple would be helpful

I tried this way

  echo $this->Form->control('support_start_date',  array(
        'class'=>'datepicker',
        'type'=>'text',
        'label' => "DatePicker",
        ), ['empty' => true]);

Still not work

    <script>
  $(function() {
$(".datepicker").datepicker({
dateFormat: 'dd-mm-yy',
 onSelect: function(dateText, inst) {
  $('#select_date').val(dateText);
  $("#datepicker").datepicker("destroy");
}
 });
 $("#datepicker").datepicker({
 dateFormat: 'dd-mm-yy',
onSelect: function(dateText, inst) {
  $('#select_date').val(dateText);
  $("#datepicker").datepicker("destroy");
}
</script>

you have to use
$("#support_start_date").datepicker and $("#end_date_support").datepicker and NOT $(".datepicker").datepicker in your js file.

I think you can remove $("#datepicker").datepicker(“destroy”); also.

But your problem is not in cakephp side but jQuery. So read the datepicker docs more carefully.