-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Ignacio,

Thanks for the tip, it has worked! (kind of) :D

Before doing anything new, I've checked if I had already loaded the
snippet of code you suggest, and it was loaded! (loaded by front.js).
As it was being ignoring it, I tried adding the code you have
mentioned, but didn't seem to work either.
Finally I've found a workaround that seems to work nicely, consisting
in a combination of what you suggest and a little hack:

At application.dryml (reload the JS code that supports I18n):

<extend tag="page">
  <old-page merge>
    <append-scripts:>
      <script>
      $.fn.datepicker.dates['es'] = {
        days: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves",
"Viernes", "Sábado", "Domingo"],
        daysShort: ["Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb",
"Dom"],
        daysMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa", "Do"],
        months: ["Enero", "Febrero", "Marzo", "Abril", "Mayo",
"Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre",
"Diciembre"],
        monthsShort: ["Ene", "Feb", "Mar", "Abr", "May", "Jun", "Jul",
"Ago", "Sep", "Oct", "Nov", "Dic"],
        today: "Hoy",
        clear: "Borrar",
        weekStart: 1,
        format: "dd/mm/yyyy"
      };
      </script>
    </append-scripts:>
  </old-page>
</extend>

At your view (the one that contains the input with
bootstrap-datepicker class on it):

<whatever-page>
...
  <append-scripts:>
    <script>
    $( document ).ready(function() {
      jQuery('.bootstrap-datepicker').datepicker('remove');
      jQuery('.bootstrap-datepicker').datepicker({language: 'es'});
    });
    </script>
  </append-scripts:>
...
</whatever-page>

As I said, this is a workaround, but I think this problem deserves an
issue at Github, what do you think? :)

Many thanks and best regards, Ibon.

Abrazo, Ibon.

Usa Software Libre, tus úlceras te lo agradecerán
Realizado con Software Libre.
- --
GPG public key at http://sinanimodelucro.net/ibon_gmail.asc
Finderprint: 1761 59B9 6DE6 0402 31B9 1872 178F A6FD 75F9 EB29

El 23/01/15 a las 13:18, Ignacio Huerta escribió:
> Hi Ibon,
> 
> Please try adding this piece of Javascript before the datepicker
> is loaded, I think it might help:
> 
> https://github.com/eternicode/bootstrap-datepicker/blob/master/js/locales/bootstrap-datepicker.es.js
>
>  Warm regards, Ignacio
> 
> El 22-01-2015 a las 10:19, Ibon Castilla escribió:
>> Hi everybody,
>> 
>> I'm experiencing some trouble with bootstrap-datepicker 
>> (http://hobocentral.net/tagdef/hobo_bootstrap_ui/hobo_bootstrap_ui/bootstrap-datepicker)
>>
>>
>> 
I have tried different syntax in application.dryml but some options
>> are (apparently) being ignored. My actual code at
>> application.dryml is:
>> 
>> <def tag='input' for='Date'> <bootstrap-datepicker language='es'
>> autoclose='false' format='dd/mm/yyyy)'/> </def>
>> 
>> * Both "autoclose" and "format" work fine. * "language" is being
>> ignored completely.
>> 
>> On the little research I've done on this, seems that the
>> language stuff is taken from Javascript, like in this sandbox: 
>> http://eternicode.github.io/bootstrap-datepicker/?markup=input&format=&weekStart=&startDate=&endDate=&startView=0&minViewMode=0&todayBtn=false&clearBtn=false&language=en&orientation=auto&multidate=&multidateSeparator=&keyboardNavigation=on&forceParse=on#sandbox
>>
>>
>> 
Before going any further, I would like to know if anyone in this list
>> has faced this issue with bootstrap-datepicker previously, and if
>> so, if he/she would be so kind to give me a tip about it :)
>> 
>> Best regards, Ibon.
>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAlTCXJUACgkQF4+m/XX56ymREACgua31MYCFEM8xqkdA1YeUgz/+
/L4An28TTSs7dijd4rDK4m133JaYeWFr
=yCxs
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to