Hi

http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js?revision=1186329&view=markup

or mirror

https://github.com/apache/tapestry5/blob/trunk/tapestry-core/src/main/resources/org/apache/tapestry5/corelib/components/datefield.js


if you are not able to build tapestry-core
perhaps you can try to patch tapestry.js with this quick and dirty kind of code

Tapestry.DateField = Class.create(Tapestry.DateField,{

   //override just to apply
   createPopup : function() {
        this.datePicker = new DatePicker();

        this.datePicker.setFirstWeekDay(this.firstDay);

        this.popup = $(this.datePicker.create());

        this.field.insert({
            after : this.popup
        });

        this.popup.absolutize().hide();

        this.datePicker.onselect = function() {
            var date = this.datePicker.getDate();

            var resultHandler = function(result) {
//guess TAP5-1844 should be apply here
                if (this.field.value != result) {
                    this.field.value = result;
                   if (this.field.onchange) this.field.onchange();
                }

                this.hidePopup();

                new Effect.Highlight(this.field);
            };

            var errorHandler = function(message) {
                this.field.showValidationMessage(message.escapeHTML());
                this.field.activate();

                this.hidePopup();
            };

            // If the field is blank, don't bother going to the server to parse!

            if (date == null) {
                resultHandler.call(this, "");
                return;
            }

            this.sendServerRequest(this.formatURL, date.getTime(),
                resultHandler, errorHandler);
        }.bind(this);
    }



});

Good luck
François

2012/4/10 Morgan Chauvel <morgancha...@gmail.com>:
> Hello everyone,
>
> I already find the solution but I can't find where the datefield.js file is.
> https://issues.apache.org/jira/browse/TAP5-1844
>
> Thanks your helping me
>
> Morgan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to