Salut à tous

besoin d'aide pour un souci de datepicker() jQuery1.4 avec le framework symfony1.2 :

lors du click sur l'input : au lieu de m'afficher le calendrier, j'ai comme erreur "inst is undefined" dans la console firebug.

un extrait des sources :

le js :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
$(document).ready(function() {
 
 
    $('.fl_devis_suivi_form').unbind('click');
    $('.fl_devis_suivi_add_piece').unbind('click');
    $('.fl_devis_suivi_add_piece2').unbind('click');
 
    $('#fl_devis_suivi_form_popup_new :input').each(function(){
         $(this).unbind("clone");
         $(this).unbind("change");
    });
 
    init();
 
    //gestion du click sur "?"
   $('.fl_devis_suivi_form').bind("click", function(){
 
       init();
 
//        if (this.id.indexOf('date') != -1) {
//            $(this).datepicker();
//        }
 
        _current_new = $(this).attr('partial_id');
        _url_partial = $(this).attr('url_partial');
        //appel_action_affiche_popup_etape(_current_new, _url_partial);
        ajax_call_with_loader($('#fl_devis_suivi_affiche_popup_etape').val() +
            '?id=' + $('#id').val() + '&current=' + _current_new + '&url_partial=' + _url_partial,
            'suivi_popup'
        );
 
        init();
 
    });
 
 
    function init(){
        //mise à jour en bdd
        $('#fl_devis_suivi_form_popup_new :input').each(function() {
 
            if (this.id.indexOf('date') != -1) {
                $(this).datepicker();
            }
 
            if($(this).attr('class') != 'fl_devis_suivi_add_piece2'){
 
                 $(this).bind("change", function() {
 
                    ajax_call_nodiv_with_loader(
                    $('#fl_devis_suivi_update_action').val() + '?id=' +  $('#id').val() +
                    '&field=' + this.id + '&value=' + this.value
                    );
                })
            }
      });
    }
 
 
 
            //mise à jour en bdd
        $('#fl_devis_suivi_form_popup_new :input').each(function() {
 
            if (this.id.indexOf('date') != -1) {
                $(this).datepicker();
            }
 
            if($(this).attr('class') != 'fl_devis_suivi_add_piece2'){
 
                 $(this).bind("change", function() {
 
                    ajax_call_nodiv_with_loader(
                    $('#fl_devis_suivi_update_action').val() + '?id=' +  $('#id').val() +
                    '&field=' + this.id + '&value=' + this.value
                    );
                })
            }
      });
});
le template :

Code php : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php use_helper('Date') ?>
 
 
<table width="100%" cellspacing="0" cellpadding="0" border="0">
    <tbody>
        <tr>
            <td width="35%"><div align="right">Date de relance :</div></td>
            <td width="4">
                <?php
                $date = $devis['suivi_date_relance'];
                // Date non renseignée, date J + 3
                if ($date == '' || $date == null)
                {
                    $date = format_date(time() + (3 * 86400));
                    flDevisTable::setDateRelance($date,$devis['id']);
                    $devis['suivi_date_relance'] = $date;
                }
                ?>
                <input type="text" readonly="readonly" value="<?php echo $date?>" id="suivi_date_relance" onFocus="focus_win(id)"/>
            </td>
            <td></td>
        </tr>
    </tbody>
</table>