• jhug
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies

First, my apologize for all of you who feel like you've answered this question a 100 times.  I've read all your responses but am still not able to get my DatePicker to appear.

 

I have a custom controller and an InputText field id="cDate".  Here's what I've done:

 

  • I've downloaded the jQuery library and uploaded the zip file as a Static Recource called "jQueryUI"
  • I've added the following code to the top of my VF page:
<apex:page Controller="conAttendanceTaking">
<apex:form >
<head> 
    <apex:includeScript value="{!URLFOR($Resource.jQueryUI, '/js/jquery-1.4.2.min.js')}"/>
    <apex:includeScript value="{!URLFOR($Resource.jQueryUI, '/js/jquery-ui-1.8.10.custom.min.js')}"/>
    <apex:stylesheet value="{!URLFOR($Resource.jQueryUI, 'css/ui-lightness/jquery-ui-1.8.10.custom.css')}"/>


    <script type="text/javascript">
        var j$ = jQuery.noConflict();
        j$(document).ready(function(){
        
            j$("#cDate").datepicker({
                dateFormat: 'yy-mm-dd',
                changeMonth: true,
                changeYear: true});
        });
     </script>
</head>
// VF code continues from here....
  •  Added my text field to the body of my VF page:
            <apex:outputLabel value="Class Date (yyyy-mm-dd)" for="ClassDate"/>
            <apex:inputText disabled="false" id="cDate" value="{!ClassDate}"/>

 

In my controller class is written and my page works fine with the exception of this date.  I'd like to have the datepicker appear when the inputText receives focus.  What am I doing wrong?

 

Thanks!

 

 

conAttendanceTaking

Hi,

 

I'm having some trouble maintaining state across multiple visualforce pages like in the wizard example. I'm using the same controller class on both visualforce pages but when I call the function that displays the next visualforce page in the wizard it creates a new controller instead of using the existing one. Any ideas why that might be?