Ok, Ive done it ant it works... more or less
Two problems:
PLease see image,
1)the class that the beforeShowDay function returns afects the TD tag ok but the day does not changes.
2)when I choose a date the datepicker appears ok, but when I choose a date, the date becomes blank and if I try to choose another one then another datepicker appears, just as when the new function did not exists and it selects the date ok.
This is my function script
!prueba color y tip
packet.append(p_web.AsciiToUTF(|
' <<script><13,10>'&|
'$( function() {{<13,10>'&|
' // An array of dates<13,10>'&|
' var eventDates = {{};<13,10>'&|
' var eventColor = {{};<13,10>'&|
' var eventTip = {{};<13,10>'&|
' eventDates[ new Date( ''05/05/2017'' )] = new Date( ''05/05/2017'' );<13,10>'&|
' eventColor[ new Date( ''05/05/2017'' )] = new String( '' red'' );<13,10>'&|
' eventTip[ new Date( ''05/05/2017'' )] = new String( ''qqqq'' );<13,10>'&|
' <13,10>'&|
' // datepicker<13,10>'&|
' $(''#'&p_web.nocolon('APP:Date')&''').datepicker({{<13,10>'&|
' dateFormat: "dd/mm/yyyy",'&|
' firstDay: 1,'&|
' beforeShowDay: function( date ) {{<13,10>'&|
' var highlight = eventDates[date];<13,10>'&|
' var color = eventColor[date];<13,10>'&|
' var tip = eventTip[date];<13,10>'&|
' if( highlight ) {{<13,10>'&|
' return [true, color, tip];<13,10>'&|
' } else {{<13,10>'&|
' return [false, '''', ''''];<13,10>'&|
' }<13,10>'&|
' }<13,10>'&|
' });<13,10>'&|
'});<13,10>'&|
'<</script><13,10>'&|
'',net:OnlyIfUTF,net:StoreAsAscii))