Strange default date with Data Picker

Strange default date with Data Picker

Hello !

I have trouble using Date Picker.
It seems to be very easy but I meet strange behaviors.
I add this widget in several inputs in a web page dynamically built in a template file (smarty).
Here is my code :

  1. <script type="text/javascript">
  2. $('#{{$idname}}').datepicker();//{{$idname}} is a smarty variable, here is not the problem.
  3. </script>
The result is that each calendar widget is well built for each input, but the default date change, it is never the same and it is never today date. Why ?

Thanks a lot