Date field losing calendar icon when property changed

Use this board to ask questions or have discussions with other Rich Displays users.
Post Reply
deonreid2
New User
Posts: 2
Joined: Fri Jan 24, 2014 1:02 pm
First Name: Deon
Last Name: Reid
Company Name: Anda
Phone: 9544657443
Address 1: 2915 Weston Rd
City: Weston
State / Province: Florida
Zip / Postal Code: 33351
Country: United States
Contact:

Date field losing calendar icon when property changed

Post by deonreid2 »

I have a date field where I have the visibility it set initially to hidden. I have a checkbox with the following javascript on the onchange event.
if(get("Checkbox3") == "Y"){
applyProperty("Date1","visibility","visible");
} else {
applyProperty("Date1","visibility","hidden");
}

The problem is the date is visible when the box is checked, however, the calendar icon is never available. What could be the cause of this?
User avatar
David
Profound Logic Staff Member
Posts: 690
Joined: Fri Jan 04, 2008 12:11 pm
First Name: David
Last Name: Russo
Company Name: Profound Logic Software
Contact:

Re: Date field losing calendar icon when property changed

Post by David »

A couple of problems here:

1. You'll want to look at the checked state of the checkbox. So try code like this:

Code: Select all


// I've always done this from the 'onclick' event, not 'onchange' event...

if(getObj("Checkbox3").checked){
 applyProperty("Date1","visibility","visible");
} else {
 applyProperty("Date1","visibility","hidden");
}

2. It's come to our attention recently that the calendar icon can fail to show/hide when the date field textbox is shown/hidden. If you run into this, please contact our technical support team, there is a patch available.
deonreid2
New User
Posts: 2
Joined: Fri Jan 24, 2014 1:02 pm
First Name: Deon
Last Name: Reid
Company Name: Anda
Phone: 9544657443
Address 1: 2915 Weston Rd
City: Weston
State / Province: Florida
Zip / Postal Code: 33351
Country: United States
Contact:

Re: Date field losing calendar icon when property changed

Post by deonreid2 »

I added the following statement to my java script and it solved it.:

attachCalendar("Date1");
Maxime
New User
Posts: 1
Joined: Thu Dec 20, 2018 3:14 am
First Name: Maxime
Last Name: PAQUET
Company Name: Aplus Informatique
Phone: +33777768723
Address 1: 34 avenue Henri Matisse
City: NICE
State / Province: Outside Canada/USA
Zip / Postal Code: 06200
Country: France
Contact:

Re: Date field losing calendar icon when property changed

Post by Maxime »

When the input element's parent (eg. layout) is display=none, then the calendar icon won't display at the correct position.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest