• manu123
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 6
    Questions
  • 6
    Replies
I have integrate CKEditor for a richtext. Richtext is within a custom popup. Custom popup shows up with a click of a command button. On the custom popup, RichText is shown as a regular textbox and CKEditor is missing.
<apex:component controller="mycontroller" allowDML="true">
   
   
  <style type="text/css">
      .custPopup{
            background-color: white;
            border-width: 0px;
            border-radius:15px;
            border-style: solid;
            border-color:#39759D;
            box-shadow: 5px 5px 10px black;
            z-index: 2;
            left: 50%;
            padding:20px;
            position: absolute;
            /* These are the 3 css properties you will need to change so the popup 
            displays in the center of the screen. First set the width. Then set 
            margin-left to negative half of what the width is. You can add 
            the height property for a fixed size pop up if you want.*/
            width: 80%;
            margin-left:-40%;
            top:105px;
            }
      .popupBackground{
            background-color:39759D;
            opacity: 0.20;
            filter: alpha(opacity = 20);
            position: absolute;
            width: 100%;
            height: 100%;
            top: 0;
            left: 0;
            z-index: 1;
        }     
   </style>    

<apex:actionRegion>  

    <apex:outputPanel id="custPopUp" > 
        <apex:outputPanel styleClass="popupBackground" rendered="{!displayPopup}"/>
            <apex:outputPanel styleClass="custPopup" layout="inline" rendered="{!displayPopup}">              
                <div align="right">
                    <apex:commandButton value="X" action="{!closePopup}" rerender="custPopUp"/>                            
                </div>                    
        <apex:pageBlockSection title="Information" columns="2"> 
            <apex:inputField showDatePicker="false" label="From" value="{!showData.From__c}" styleclase="styledate"/>
            <apex:inputField id ="To" label="To" value="{!showData.To__c}" showDatePicker="false" styleclase="styledate"/>               
        </apex:pageBlockSection>
        </apex:outputPanel>
    </apex:outputPanel>
    </apex:outputPanel>
</apex:actionRegion>

....

    <apex:commandLink style="width:125px;text-decoration: none;" styleClass="btn" action="{!showPopup}"  rerender="custPopUp">   
      
    </apex:commandLink>
</apex:component>

styleclass=showDate -- opens a calendar. The style and scripts are in a static resource files.
This styleclass works on the page, but style is lost when Popup is opened.
How to count number of options selected from multiselect picklist
I am trying to implement a requirement for date field. 
1. When Date field is clicked, calendar should popup and so that date can be selected.
2. When i enter Date, Date field should be autopopulated with a '/', a masking of date as mm/dd/yyyy

Both calendar and masking are working but selected date is not saved to the object.
Please provide direction on implementing this feature

Here is my visualforce page
<apex:page showHeader="false" sidebar="false" standardcontroller="timeobject__c">  
<apex:includeScript value="{!URLFOR($Resource.JSCalendar,'calendar.js')}"/>
<apex:stylesheet value="{!URLFOR($Resource.JSCalendar,'calendar_blue.css')}" />
<apex:includeScript value="{!URLFOR($Resource.jquerymaskedinput3, 'jquery.maskedinput-master/lib/jquery-1.8.3.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.jquerymaskedinput3, 'jquery.maskedinput-master/src/jquery.maskedinput.js')}"/>

<apex:form id="CustomerDate">            
    <apex:pageBlock >         
        <apex:pageBlockSection>   
        <apex:inputField id="customerDate" value="{!timeobject__c.Date__c}" showDatePicker="false"
                  onmouseover="initialiseCalendar(this, '{!$Component.customerDate}')" styleClass="date-mask"/>   
        </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:commandButton value="Next" action="{!save}" id="save"/>     
</apex:form>           


<script>
$(".date-mask").mask("99/99/9999");

}

function fnSetDateFormat(oDateFormat)
{
 oDateFormat['FullYear'];  
 oDateFormat['Year'];   
 oDateFormat['FullMonthName']; 
 oDateFormat['MonthName'];  
 oDateFormat['Month'];
 oDateFormat['Date'];
 oDateFormat['FullDay'];
 oDateFormat['Day'];
 oDateFormat['Hours'];
 oDateFormat['Minutes'];
 oDateFormat['Seconds'];
 
 var sDateString;
 sDateString = + oDateFormat['Month'] +"/" + oDateFormat['Date'] +"/"+ oDateFormat['FullYear'];
 return sDateString;
}
  
    
function initialiseCalendar(obj, eleId)
{
 var element=document.getElementById(eleId);
 var params='close=true';
 if (null!=element)
 {
  if (element.value.length>0)
  {
   var month=element.value.substr(3,2);
   var year=element.value.substr(6,4);
   params+=',month='+month;
   params+=',year='+year;
  }
 }
 fnInitCalendar(obj, eleId, params);
}
 </script>
</apex:page>


 
I have date field on VisualForce page, which uses Calendar.js to Pick a Date.
When user types the date, then date should be masked as '99/99/9999'.
'/' should be auto-populated when user is typing in the date value.
 
I have a requirement to design VF pages so that each field in custom object is on a different page.
I have used PageReference in apex class that saves the data and navigates to next object.

Problem i am facing, is the save is creating new instance of the object instead of updating.
Please provide a way to update the same instance of the object before navigating to next page.
 
I have integrate CKEditor for a richtext. Richtext is within a custom popup. Custom popup shows up with a click of a command button. On the custom popup, RichText is shown as a regular textbox and CKEditor is missing.
How to count number of options selected from multiselect picklist
I have date field on VisualForce page, which uses Calendar.js to Pick a Date.
When user types the date, then date should be masked as '99/99/9999'.
'/' should be auto-populated when user is typing in the date value.
 
I have a requirement to design VF pages so that each field in custom object is on a different page.
I have used PageReference in apex class that saves the data and navigates to next object.

Problem i am facing, is the save is creating new instance of the object instead of updating.
Please provide a way to update the same instance of the object before navigating to next page.
 

hi,

i want mask in telephone number like this.

(999) 999-9999

 

I have tried with Jquery but not done at all.

 

please suggest me solution

 

Thanks in advance