• abs2310
  • NEWBIE
  • 0 Points
  • Member since 2017

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

Apologies if this has already been answered but I have spent more than an hour looking and still cannot find an answer to my problem:

 

I am using a datepicker on an apex:inputtext field, to establish a from and to date range. It works fine, but when the screen is refreshed the value in the date changes from:

 

   D/MM/YYY format (what I am after), to something like this: 

   Mon Jul 15 00:00:00 GMT 2013

 

Therefore, next time I attempt to perform an action, I get an error message saying:

 

   Error:   Value 'Mon Jul 15 00:00:00 GMT 2013' cannot be converted from Text to Date
 
How can I prevent the date from being incorrectly reformatted?
 
Here is an exceprt from my VF code:
 

<apex:pageBlockSectionItem >
   <apex:outputLabel value="From Due Date" for="fromDate"/>
   <apex:inputText value="{!fromDateCriteria}" size="10" onfocus="DatePicker.pickDate(false, this, false);" id="fromDate" />
</apex:pageBlockSectionItem>

<apex:pageBlockSectionItem >

 

<apex:pageBlockSectionItem >
   <apex:outputLabel value="To Due Date" for="toDate"/>
   <apex:inputText value="{!toDateCriteria}" size="10" onfocus="DatePicker.pickDate(false, this, false);" id="toDate" />
</apex:pageBlockSectionItem>

 

 

My controller simply uses auto getters and setters:

 

public date FromDateCriteria {get;set;}
public date ToDateCriteria {get;set;}

 

Everything work fine, except for the reformat when the UI is redisplayed.

 

Thanks in advance...

I want to call a campaign report from a link off the campaign. The custom link that calls the default call down report is a link to a .jsp, and I can't control the fields that are displayed on the report it calls up.

I have created a campaign report that has the fields I want. Can anyone give guidance on how to call the report and pass the parameter of campaign id? I can't use the pv1= notation, because it's not really a parameter, as far as I can tell.

Thanks!

Steve
  • March 01, 2006
  • Like
  • 0