Calendar control to show only one month rather than two

Customisation Title Calendar control to show only one month rather than two
Purpose of Customisation The default calendar control shows the currently selected and next month when the icon is clicked, preference is not to show the next month in the control.
Author Greg Griffiths
Date of Customisation 25 July 2016
Covers Livelink Content Suite 16
Livelink Modules Home
Affected Templates \module\home\datefield.html
Customisation Format HTML
Download Here Download as a ZIP file for Content Suite 16

Recently a post on the Knowledge Centre caught my attention, and I realised that this could be quickly solved with a simple change to the underlying WebLingo page. Looking at the source of the page with the control on, I was able to determine which WebLingo file was the one that control the date control, further analysis identified a series of parameters for the control, one of which was a value for number of months, amending that achieves what we were looking for :

    $( "#_datepicker_`fieldname`" ).datepicker({
        numberOfMonths: 21,
        showButtonPanel: false,

Current New
Screenshot Screenshot

My friend, Mark Farrall, has also pointed out that as the value we are changing is a JavaScript property you can change it using the following JavaScript code, which could be included in an Appearance or similar, as an alternative method of delivering this customisation :

$('.hasDatepicker').datepicker('option','numberOfMonths', 1)

The above WebLingo, as well as the JavaScript approach, can be futher refined with additional OScript or JavaScript if you are seeking to target only a subset of the Date attribute on the page or only want the change for a specific Date attribute in a specific Category etc.
Website Designed by Adservio Consulting      Bookmark and Share Valid HTML 4.01 Strict    Valid CSS!    Level A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0