Datepicker无法启动

I load datas with ajax (thru PHP):

     $retour.= '

 <table id="dates_stages_comp">
  <tr>
   <th>Nom</th><th>Prénom</th><th>Matricule</th><th>Année</th><th>Dates début</th><th>Date fin</th><th>&nbsp;</th>
  </tr>';

 foreach($resultatSQL as $ligneSQL)
 {

     $retour .= '<tr><td>'.$ligneSQL->nom.'</td>';
     $retour .= '<td>'.$ligneSQL->prenom.'</td>';
     $retour .= '<td>'.$ligneSQL->matricule . '</td>';
     $retour .= '<td>'.$ligneSQL->annee.'</td>';
     $retour .= '<td>'.$ligneSQL->date_debut_stage_comp.'</td>';
     $retour .= '<td><input id="datepicker_debut_s_c" type="text" value="'.$ligneSQL->date_fin_stage_comp.'" /></td>';
     $retour .= '<td><input id="datepicker_fin_s_c" type="text" value="'.$ligneSQL->date_fin_stage_comp.'" /></td>';

 } 

 $retour.='</table>';
 echo $retour;

retour is back in french

This is my js code :

    $('#datepicker_debut_s_c').datepicker(
    {
        dateFormat: 'dd-mm-yy',
        changeYear: true,
        maxDate: null
    });

    $('#datepicker_fin_s_c').datepicker(
    {
        dateFormat: 'dd-mm-yy',
        changeYear: true,
        maxDate: null
    });

    alert($('#datepicker_debut_s_c').length);

   $.ajax
   (
      {
         type: 'POST',
         url: 'dates_stages_complermentaires.php',
         dataType: 'text',
         success: function(retour)
         {
           $('#dates_infos_stages_comp').html(retour);   
        },
        error:function(retour)
        {
            alert(retour);
        }
      }  
   );

The problem is my datepicker doesn't launch...

alert($('#datepicker_debut_s_c').length);

gives me 0

The code above is inside:

$(document).ready(function() {

Elements added to the page after the page has loaded aren't automatically assigned the event listeners, you have do that that yourself after the ajax call.

So you should be doing something like this:

$.ajax({ 
    type: 'POST', 
    url: 'dates_stages_complermentaires.php', 
    dataType: 'text', 
    success: function(retour) { 
        $('#dates_infos_stages_comp').html(retour);

        $('#datepicker_debut_s_c').datepicker({
            dateFormat: 'dd-mm-yy',
            changeYear: true,
            maxDate: null
        });     

        $('#datepicker_fin_s_c').datepicker({
            dateFormat: 'dd-mm-yy',
            changeYear: true,
            maxDate: null
        });
    }, 
    error:function(retour) { 
    alert(retour); 
    } 
});

Also check the javascript console for errors and also make sure the ID's on the datepicker elements are unique if you create multiple elements through ajax.