Hi Robert,
perfect, thanks!
> my idea (after i read your mail) is that i create a new class
>
> travelagent.impl.fe.travelplaner.uis.DateWidget
> (extend datefield)
>
> and in my CalenderWidget i use this with "this.__dateField = new
> ....DateWidget();"
>
> in the class DateWidget i will override the two methods you are talking about.
>
Yes, that's what I would do. Create an own widget and extend from
DateField. The new widget in your case "DateWidget" should have a
property to set the depending date and the override the method
"_onPopupChangeVisibility". For example:
_onPopupChangeVisibility : function(e)
{
var popup = this.getChildControl("popup");
if (popup.isVisible())
{
var chooser = this.getChildControl("list");
var date = this.getDependingDate();
chooser.showMonth(date.getMonth(), date.getFullYear());
}
},
> Or can i make direct use of the method shownMonth()?
>
I think using the showMethod direct could have no effect, because the
"_onPopupChangeVisibility" synchronize the TextField from the DateField
with the DateCooser. If the pop-up is opened your call with showMethod
should be overridden. I think the only way is to extend from DateField
and override the method.
Cheers,
Chris
> Robert
>
>
>
>
> ------ Original-Nachricht --------
>
>> Datum: Thu, 23 Jul 2009 17:52:46 +0200
>> Von: Christian Schmidt <[email protected]>
>> An: qooxdoo Development <[email protected]>
>> Betreff: Re: [qooxdoo-devel] datefield - changing month in popup
>>
>
>
>> Hi Robert,
>>
>> you sad: "In CalenderWidget i create the DateField". This sounds like
>> you use the DateField in CalenderWidget as an association. Could you
>> please send me a code snipped? This make it easier to help.
>>
>> Thanks,
>> Chris
>>
>> Robert Wende schrieb:
>>
>>> Hi Chris,
>>>
>>> i have an own class CalenderWidget which extend another own class
>>>
>> AbstractWidget. In CalenderWidget i create the Datefield. So i can not derive
>> from datefield. exist another method to use the method showMonth? After i
>> look
>> in the API, i think this is the class i searched for.
>>
>>> thanks,
>>> Robert
>>>
>>> -------- Original-Nachricht --------
>>>
>>>
>>>> Datum: Thu, 23 Jul 2009 16:17:54 +0200
>>>> Von: Christian Schmidt <[email protected]>
>>>> An: qooxdoo Development <[email protected]>
>>>> Betreff: Re: [qooxdoo-devel] datefield - changing month in popup
>>>>
>>>>
>>>
>>>
>>>> Hi Robert,
>>>>
>>>> the pop-up contains the DateCooser[1] widget. This widget has a method
>>>> "showMonth" this could be used to jump to a month without setting the
>>>> value to this.
>>>>
>>>> I would derive from DateField and create my own one. The new class
>>>>
>> would
>>
>>>> get a property "dependingDate" and override the method
>>>> "_onPopupChangeVisibility". The "_onPopupChangeVisibility" would call
>>>> the "showMonth" method if the pop-up is visible.
>>>>
>>>> I hope this answer solve your problem.
>>>>
>>>> Cheers,
>>>> Chris
>>>>
>>>> [1]
>>>>
>> http://demo.qooxdoo.org/current/apiviewer/#qx.ui.control.DateChooser
>>
>>>>
>>>> Robert Wende schrieb:
>>>>
>>>>
>>>>> Hello,
>>>>>
>>>>> i want to change the month when i click on my datefield. for example:
>>>>>
>> in
>>
>>>>>
>>>>>
>>>> my textfield contains the phrase "dd.mm.yyyy". if i click on the
>>>>
>> calender
>>
>>>> icon, i don't want to see the actual month but rather a dynamic display
>>>>
>> of
>>
>>>> the month which is depending on an other variable.
>>>>
>>>>
>>>>> as yet i use setDate(dependingDate) and afterwards
>>>>>
>>>>>
>>>> setValue("dd.mm.yyyy"). but first i see the depending date in the
>>>>
>> datefield and then changing to
>>
>>>> "dd.mm.yyyy".
>>>>
>>>>
>>>>> Exist another way to change the month and day selection in the popup,
>>>>>
>>>>>
>>>> but holding the actual Value of the datefield?
>>>>
>>>>
>>>>> thanks,
>>>>> Robert
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Christian Schmidt
>>>> Software Entwickler
>>>>
>>>> 1&1 Internet AG - Web Technologies
>>>> Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
>>>> [email protected]
>>>>
>>>> Amtsgericht Montabaur / HRB 6484
>>>> Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas
>>>> Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr.
>>>>
>> Oliver
>>
>>>> Mauss, Jan Oetjen
>>>> Aufsichtsratsvorsitzender: Michael Scheeren
>>>>
>>>>
>>>>
>>>>
>> ------------------------------------------------------------------------------
>>
>>>> _______________________________________________
>>>> qooxdoo-devel mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>>
>>>>
>>>
>>>
>> --
>> Christian Schmidt
>> Software Entwickler
>>
>> 1&1 Internet AG - Web Technologies
>> Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
>> [email protected]
>>
>> Amtsgericht Montabaur / HRB 6484
>> Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas
>> Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver
>> Mauss, Jan Oetjen
>> Aufsichtsratsvorsitzender: Michael Scheeren
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>
>
--
Christian Schmidt
Software Entwickler
1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
[email protected]
Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas
Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver
Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel