CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Jquery Datepicker - how to ?

Print topic Send  topic

Author Message
torbenus

Posts: 4
Posted: 10/19/2013, 12:13 PM

How do you set i.e. date range on ccs jquery inlinedatepicker, like the example listed below from iquery homepage ?

Sincerly
Torben Soemod

----------------------------------------------------------------------------------------------------------------------

<!doctype html>

<html lang="en">
<head>
<meta charset="utf-8" />
<title>jQuery UI Datepicker - Restrict date range</title>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css" />
<script>
$(function() {
$( "#datepicker" ).datepicker({ minDate: -20, maxDate: "+1M +10D" });
});
</script>
</head>
<body>

<p>Date: <input type="text" id="datepicker" /></p>


</body>
</html>

----------------------------------------------------------------------------------------------------------------------
View profile  Send private message
eratech


Posts: 513
Posted: 03/03/2014, 11:33 PM

I've just come from a similar 'how to do a jquery option in CCS Datepicker?' problem. I will add it as a time, but the short version is that you can edit the default parameters that CCS puts together for it's 'plugin' version of the datepicker, and it will pass them directly through.

That is, the generated code for a datetime picker in the HTML page is like:

//Feature Parameters @1-FBACC53D  
    params["eventsdate_startInlineDatePicker1"] = {   
        dateFormat: "d/MM/yyyy",  
        isWeekend: true  
        // can add params here   
        , minDate: -20  
        , maxDate: (new Date(2014, 5, 26))  
    };  
//End Feature Parameters  
  
//Feature Init @1-F75AE43A  
    features["eventsdate_startInlineDatePicker1"].ccsBind(function() {  
        this.ccsDateTimePicker(params["eventsdate_startInlineDatePicker1"]);  
    });  
//End Feature Init

For some reason the maxDate: " +1M +10D" didn't work so I put a set date in, instead to check.

Hope that helps

Eric
_________________
CCS 3/4/5 ASP Classic, VB.NET, PHP
Melbourne, Victoria, Australia
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.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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