Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8629611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:51:06+00:00 2026-06-12T08:51:06+00:00

I have a Tridion Date control added to a GUI Extension .aspx page I

  • 0

I have a Tridion Date control added to a GUI Extension .aspx page I have created.

I’ve added this to the ASPX page with

<c:Date id="AdjustDate" runat="server" 
IsSeparateFields="false" AddClearButton="false" TabIndex="3"></c:Date>

and in my .JS I’ve added the following to

  1. Give me a handle onto the Tridion Date Control (to select the date values etc.)

    c.AdjustDate =
    $controls.getControl($(“#AdjustDate”),
    “Tridion.Controls.Date”)

  2. Capture changes in the date (after the user selects OK in the modaldialog)

    $evt.addEventHandler(c.AdjustDate, “change”,
    this.getDelegate(this._onHighlightDateChange));

I capture the event and perform some updates based on the date selected.

However, my GUI extension dialog is smaller in height than when the modal dialog is shown. I’d like to resize my ASPX dialog when the user clicks Select Date and the modal dialog is presented.

I’ve now captured the event of the user clicking the Select Date button

c.BtnDateSelect = $controls.getControl($("#AdjustDate_selectbutton"),
"Tridion.Controls.Button");
$evt.addEventHandler(c.BtnDateSelect, "click", 
this.getDelegate(this._onDateButtonClicked));

However – I can’t seem to access the height of the resulting dialog as I can’t add any events to tie in

  1. the opening of the dialog itself
  2. the user clicking OK or Cancel (to adjust the height again) or
  3. the modal dialog being closed

Am I missing events to tie into?

I’ve tried to create a handle to the OK button using

BtnDateOKSelect = 
$controls.getControl($("html#DatePickerPopup.popup body center div#buttonContainer div#ButtonOk.tridion"),
 "Tridion.Controls.Button");

but the reference (and variations of it) return undefined – possibly as this is in an iframe so the script can’t access it?

Any pointers on working out what the events are I can tie into?
How to tie into those events (and when)?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:51:07+00:00Added an answer on June 12, 2026 at 8:51 am

    You cannot resize a dialog (modal) after it has been open. I wrote an extension where I had a similar problem, when my date picker was over my modal dialog, It look weird, so I made my dialog date picker bigger.

    However I wasn’t using a date picker control, but a regular html button. Here the code:

    So I retrieve button and add the handler to show the date picker:

    c.BtnStartDate = $controls.getControl($("#startDate"), "Tridion.Controls.Button");
    $evt.addEventHandler(c.BtnStartDate, "click", this.getDelegate(this._onStartDateButtonClicked));
    

    This is the code in the event:

    SetDateRange$_onStartDateButtonClicked(event) {    
        this._setDate(event, "#startDate");
    
    };
    

    And the setDate function:

    SetDateRange.prototype._setDate = function SetDateRange$_setDate(event, controlSelector) {
        var p = this.properties;
        var currentDate = new Date();
        var c = p.controls;
    
    
        p.datePickerPopup = $popup.create(
            $cme.Popups.DATE_PICKER.URL, {
                width: 550,
                height: 350
            },
            {
                date: currentDate,
                popupType: Tridion.Controls.Popup.Type.MODAL_IFRAME
            }
        );
    
        function SetDateRange$DatePicker$onPopupCanceled(event) {
            if (p.datePickerPopup) {
                p.datePickerPopup.dispose();
                p.datePickerPopup = null;
            }
        }
    
        function SetDateRange$DatePicker$onPopupSubmitted(event) {
            var value = event.data.date;
            if (value) {
                var value = new Date(value);
    
                value = $localization.getFormattedDateTime(value, Tridion.Runtime.LocaleInfo.fullDateTimeFormat);
                jQuery(controlSelector).trigger('setdate', [value]);
            }
            p.datePickerPopup.dispose();
            p.datePickerPopup = null;
        }
    
        $evt.addEventHandler(p.datePickerPopup, "unload", SetDateRange$DatePicker$onPopupCanceled);
        $evt.addEventHandler(p.datePickerPopup, "submit", SetDateRange$DatePicker$onPopupSubmitted);
        $evt.addEventHandler(p.datePickerPopup, "close", SetDateRange$DatePicker$onPopupCanceled);
    
        p.datePickerPopup.open();
    };
    

    Again, it might not be the solution to your scenario, but this example shows how to open the date picker dialog and use the values it returns, without using the “Tridion Date Picker Control”.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating Tridion GUI Extension, in this i have created a button (InsertCP)
I have an aspx page PopupReference. I am having Tridion control button and few
I have written a GUI extension for SDL Tridion 2011 SP1. The GUI consists
I have configured Tridion for User Generated content, and created a web page using
In Tridion I have a page to which a component is attached that has
In SDL Tridion 2009 SP1 we have Components that are added to Structure Group
How does the Tridion GUI Extension config map the names to the JS file?
I am using SDL Tridion 2011. I have created a Component of field type
I have a custom button created in the ribbon of tridion. If an item
I've installed Fredhopper on a different server than where Tridion sits and have followed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.