CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> Tips & Solutions

 Jquery Datepicker custom options arguments

Print topic Send  topic

Author Message
MichaelMcDonald

Posts: 596
Posted: 09/25/2015, 6:42 PM

Kids don't try this at home...

CCS will make sure the date format is consistent with your locale settings and override this default and

this will bring on Year and Month selector and custom Year range...


in your js/jquery/datepicker/ccs-date-timepicker.js

(function ($) {
var dataParameterName = "ccsDateTimePicker";
var nativeGenerateHTML, nativeUpdateDatepicker, nativeShowDatepicker;

var defaults = {
dateFormat: 'MM/dd/yy hh:mm:ss tt', // See format options on https://github.com/jquery/globalize
showTime: true, // Visible Time
isWeekend: false,
changeMonth: true,
changeYear: true,
yearRange: "2007:2085",
showButtonPanel: true,
zIndex: 1005
};

_________________
Central Coast, NSW, Australia.

Use the EXETA Online Business Valuation Tool to
value your business.

www.exeta.com.au
View profile  Send private message
laneoc

Posts: 126
Posted: 09/14/2016, 10:53 AM

This was very helpful, thanks MMcD. I used your tip and took a couple other dives into the options.

When code is generated for a specific field, the html code looks similar to this:
  
params["xxxFIELD_NAMExxxInlineDatePicker1"] = {  
    dateFormat: "ShortDate",  
    isWeekend: true };  

You may control the Jquery Datepicker options at the individual field level by adding options here, too. Example:

  
params["xxxFIELD_NAMExxxInlineDatePicker1"] = {  
    dateFormat: "ShortDate",  
    yearRange: "2007:2085",  
    isWeekend: true };  

Another example - control the range from which the user can select a date:

  
params["xxxFIELD_NAMExxxInlineDatePicker1"] = {  
    dateFormat: "ShortDate",  
    yearRange: "2007:2085",  
    minDate: "{calculated_value_for_min}",  
    maxDate: "{calculated_value_for_max}",  
    isWeekend: true };  

Other options are documented well in the Jquery Datepicker pages.

Have fun.

Lane O.

_________________
Lane
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.