Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

104
Vistas
Can I know what is the year in OnClientShown function in months body?

I have a CalendarExtender like this

<asp:TextBox ID="txb" runat="server" OnTextChanged="txb_TextChanged" AutoPostBack="true" CausesValidation="true" onchange="txbTextChanged()" />
<asp:CalendarExtender ID="cle" runat="server" Format="MMM, yyyy" TargetControlID="txb" OnClientHidden="onCalendarHidden" OnClientShown="onCalendarShown" BehaviorID="calendarTLMonth" DefaultView="Months" DaysModeTitleFormat="MMM, yyyy" />

The java script functions are:

function onCalendarShown() {

    var cal = $find("calendarTLMonth");
    cal._switchMode("months", true);

    if (cal._monthsBody) {
        for (var i = 0; i < cal._monthsBody.rows.length; i++) {
            var row = cal._monthsBody.rows[i];
            for (var j = 0; j < row.cells.length; j++) {
                Sys.UI.DomEvent.addHandler(row.cells[j].firstChild, "click", call);
            }
        }
    }
}

function onCalendarHidden() {
    var cal = $find("calendarTLMonth");
    if (cal._monthsBody) {
        for (var i = 0; i < cal._monthsBody.rows.length; i++) {
            var row = cal._monthsBody.rows[i];
            for (var j = 0; j < row.cells.length; j++) {
                Sys.UI.DomEvent.removeHandler(row.cells[j].firstChild, "click", call);
            }
        }
    }
}

function call(eventElement) {
    var target = eventElement.target;
    switch (target.mode) {
        case "month":
            var cal = $find("calendarTLMonth");
            cal._visibleDate = target.date;
            cal.set_selectedDate(target.date);
            cal._blur.post(true);
            cal.raiseDateSelectionChanged();
            break;
    }
}

I want enable and disable months randomallicaly- not with startDate. For this, I need to know what is the date: month and year. Can I know in the onCalendarShown function, in both loops, i and j, before doing addHandler, what is the year?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda