NetTalk Central

Author Topic: Text on a datepoicker button??  (Read 6495 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • Email
Text on a datepoicker button??
« on: February 24, 2011, 07:26:33 AM »
Hi

On a wizard form I have this date field.
I would like to put a text on the calendar button next to the date field insted of just an icon. But I only get a tip (the text from the tab-header??)
I have tryed with these options:
buttonText: 'Please select a date...'
showOn: 'button'
buttonImageOnly: false

Any ideas?

/Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11201
    • View Profile
Re: Text on a datepoicker button??
« Reply #1 on: February 24, 2011, 07:45:48 PM »
Hi Niels,

The button next to the date field is generated by the jQuery Date Picker, not by NetTalk.

You'll remember we covered Date Options during the training, and it's in the notes, so this is an excellent opportunity for you to review that section, and also to take the next step. If you don't get it fairly quickly let me know and I'll give you a hint or three, but it'll be a lot more effective for you in the long run if you give it a try.

After you've done it for one field, then figure out how to do it for all the date fields, by writing just one line of code. Again, let me know if you need hints.

cheers
Bruce

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • Email
Re: Text on a datepoicker button??
« Reply #2 on: March 01, 2011, 01:12:51 AM »
Hi Bruce
I know that the Date Picker is Jquery (I was paying attention at your class  ;D)
I have tryed to follow this http://jqueryui.com/demos/datepicker/#option-buttonText option, but can't make i work.
That's my problem.
All my translations of days and buttons works fine....
Regards Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11201
    • View Profile
Re: Text on a datepoicker button??
« Reply #3 on: March 01, 2011, 07:21:23 AM »
ok, cool - so are you setting loc:options? or p_web.site.dateOptions?
what are you setting it to, and where?

Cheers
Bruce

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • Email
Re: Text on a datepoicker button??
« Reply #4 on: March 01, 2011, 08:29:54 AM »
The options are set at: Set Jquery Date Options

Soruce:
loc:options = Choose(loc:options='','',clip(loc:options) & ',') & 'monthNames: [''Januar'', ''Februar'', ''Marts'', ''April'', ''Maj'', ''Juni'', ''Juli'', ''August'', ''September'', ''Oktober'', ''November'', ''December'']'&|
',monthNamesShort: [''Jan'', ''Feb'', ''Mar'', ''Apr'', ''Maj'', ''Jun'', ''Jul'', ''Aug'', ''Sep'', ''Okt'', ''Nov'', ''Dec'']'&|
',dayNamesMin: [''Sø'', ''Ma'', ''Ti'', ''On'', ''To'', ''Fr'', ''Lø'']'&|
',dayNamesShort: [''Søn'', ''Man'', ''Tir'', ''Ons'', ''Tor'', ''Fre'', ''Lør'']'&|
',closeText: ''Luk'''&|
',currentText: ''Idag'''&|
',dateFormat: ''dd/mm/yyyy'''&|
',nextText: ''Frem'''&|
',prevText: ''Tilbage'''&|
',numberOfMonths: 2'&|
',dayNames:[''Søndag'', ''Mandag'', ''Tirsdag'', ''Onsdag'', ''Torsdag'', ''Fredag'', ''Lørdag'']'&|
',firstDay: 1'&|
',showWeek: true'&|
',noWeekendsPicker: true'&|
',buttonText: ''Select date'''&|
',showOn: ''button'''&|
',weekHeader: ''Uge'''

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 420
    • View Profile
    • Email
Re: Text on a datepoicker button??
« Reply #5 on: April 04, 2011, 03:37:37 AM »
Hi Bruce

Did you ever get into this problem.

/Niels

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11201
    • View Profile
Re: Text on a datepoicker button??
« Reply #6 on: May 12, 2011, 05:44:38 AM »
I used your code above in example 21 (build 5.26 and later.)
I embedded it into the UpdateInvoices procedure, Value::INV:Date  Routine,
In the embed point ! Start of "Set jQuery Date Options"
See attached pic.

It seems to be working ok (in 5.25), so I guess it's fixed.


[attachment deleted by admin]