NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: seanh on September 10, 2017, 09:49:27 PM
-
Hi all
Can the popup calendar be made to start on a Monday?
-
yes.
the option is called firstDay (and it's case sensitive.)
http://api.jqueryui.com/datepicker/#option-firstDay
If you want to do it for just one calendar, then set it in the embed right
before that calendar is created. For example;
value::MAI:StartDate Routine
.....
p_web.SetOption(loc:options,'firstDay',1)
.....
packet.append(p_web.CreateDateInput .....
If you want to set it for all the lookup calendars, then go to the
WebHandler procedure, to the CreateDateInput method.
Before the parent call there, put
self.SetOptions(p_Options,'firstDay',1,true)
! the last parameter there specifies this is a default value, and can still
be overridden if desired at the local level.
Cheers
Bruce
-
Hi Bruce
I put "self.SetOptions(p_Options,'firstDay',1,true)" in "p_web.CreateDateInput PROCEDURE" but got error: Field not found: SETOPTIONS
Jari
-
What NetTalk build are you on?
update: should be SetOption of course, not SetOptions.
-
Hi Bruce
9.28
This works fine in one calendar place but it would be nice to translate all in Webhandler procedure
p_web.SetOption(loc:options,'firstDay',1)
p_web.SetOption(loc:options,'dayNamesShort','["Ma", "Ti", "Ke", "To", "Pe", "La", "Su"]' )
p_web.SetOption(loc:options,'dayNamesMin','["Ma", "Ti", "Ke", "To", "Pe", "La", "Su"]' )
p_web.SetOption(loc:options,'monthNames','[ "Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu" ]')
p_web.SetOption(loc:options,'prevText','"Edellinen"')
p_web.SetOption(loc:options,'nextText','"Seuraava"')
p_web.SetOption(loc:options,'currentText','"Tänään"')
p_web.SetOption(loc:options,'closeText','"Peru"')
-
Hi Jari
I have this piece of code in webhandler processlink embed:
Self.site.DateOptions = '' & |
'monthNames: [''Tammi'',''Helmi'',''Maalis'',''Huhti'',''Touko'',''Kesä'',''Heinä'',''Elo'',''Syys'',''Loka'',''Marras'',''Joulu'']' &|
',monthNamesShort: [''Tam'', ''Hel'', ''Maa'', ''Huh'', ''Tou'', ''Kes'', ''Hei'', ''Elo'', ''Syy'', ''Lok'', ''Mar'', ''Jou'']' &|
',dayNames: [''Sunnuntai'', ''Maanantai'', ''Tiistai'', ''Keskiviikko'', ''Torstai'', ''Perjantai'', ''Lauantai'']' &|
',dayNamesMin: [''Su'', ''Ma'', ''Ti'', ''Ke'', ''To'', ''Pe'', ''La'']' &|
',dayNamesShort: [''Sun'', ''Maa'', ''Tii'', ''Kes'', ''Tor'', ''Per'', ''Lau'']' &|
',closeText: ''Sulje''' &|
',currentText: ''Tänään''' &|
',dateFormat: ''dd.mm.yy''' &|
',nextText: ''Seuraava''' &|
',prevText: ''Edellinen''' &|
',weekHeader: ''Vko''' &|
',showWeek: ''true''' &|
',firstDay: 1' &|
',numberOfMonths: 2'
Takes care of all calendar popups
:: rainer
-
Thanks Rainer :)
That works!
I still had to change with Scandinavian letters
Self.site.DateOptions = '' & |
'monthNames: [''Tammi'',''Helmi'',''Maalis'',''Huhti'',''Touko'',''Kesä'',''Heinä'',''Elo'',''Syys'',''Loka'',''Marras'',''Joulu'']' &|
',monthNamesShort: [''Tam'', ''Hel'', ''Maa'', ''Huh'', ''Tou'', ''Kes'', ''Hei'', ''Elo'', ''Syy'', ''Lok'', ''Mar'', ''Jou'']' &|
',dayNames: [''Sunnuntai'', ''Maanantai'', ''Tiistai'', ''Keskiviikko'', ''Torstai'', ''Perjantai'', ''Lauantai'']' &|
',dayNamesMin: [''Su'', ''Ma'', ''Ti'', ''Ke'', ''To'', ''Pe'', ''La'']' &|
',dayNamesShort: [''Sun'', ''Maa'', ''Tii'', ''Kes'', ''Tor'', ''Per'', ''Lau'']' &|
',closeText: ''Sulje''' &|
',currentText: ''Tänään''' &|
',dateFormat: ''dd.mm.yy''' &|
',nextText: ''Seuraava''' &|
',prevText: ''Edellinen''' &|
',weekHeader: ''Vko''' &|
',showWeek: ''true''' &|
',firstDay: 1' &|
',numberOfMonths: 2'