Opened 8 years ago

Closed 6 years ago

#17565 closed defect (patchwelcome)

dojox/mobile/DatePicker does not send user’s input back to the value attribute

Reported by: Akira Sudoh Owned by: Patrick Ruzand
Priority: undecided Milestone: 1.13
Component: DojoX Mobile Version: 1.9.1
Keywords: Cc:
Blocked By: Blocking:


dojox/mobile/DatePicker does not send user’s input back to the value attribute. It’s not fortunate for applications integrating dojox/mobile/DatePicker and dojox/mvc, given such application wants to bind the value attribute a property in data model.

Currently application needs something like the aspect.after() portion in below example to work around that:

<!DOCTYPE html>
        <script type="text/javascript" src="//" data-dojo-config="mblThemeFiles: ['base', 'DatePicker']"></script>
        <script type="text/javascript" src="//" data-dojo-config="async: 1, parseOnLoad: 0"></script>
        <script type="text/javascript">
            ], function(array, aspect, locale, stamp, Stateful, at, parser, DatePicker){
       = at;
                window.model = new Stateful({
                    date: stamp.toISOString(new Date())
                aspect.after(DatePicker.prototype, "startup", function(){
                    var self = this,
                        slots = this.slots;
                    array.forEach(slots, function(slot){
                        self.own("value", function(){
                            var pattern = slots[0].pattern + "/" + slots[1].pattern + "/" + slots[2].pattern;
                            self._set("value", stamp.toISOString(locale.parse(slots[0].get("value") + "/" + slots[1].get("value") + "/" + slots[2].get("value"), {datePattern: pattern, selector: "date"})));
        <div data-dojo-type="dojox/mobile/DatePicker" data-dojo-props="value: at(model, 'date')"></div>
        <div>Date picker value: <span data-dojo-type="dojox/mvc/Output" data-dojo-props="value: at(model, 'date')"></span></div>

Change History (3)

comment:1 Changed 8 years ago by Patrick Ruzand

Milestone: tbd1.10
Owner: set to Patrick Ruzand
Status: newassigned

comment:2 Changed 8 years ago by Patrick Ruzand

Milestone: 1.10tbd

comment:3 Changed 6 years ago by dylan

Milestone: tbd1.12
Resolution: patchwelcome
Status: assignedclosed

Given that no one has shown interest in creating a patch in the past 2+ years, I'm closing this as patchwelcome. Please let us know if you would like to get involved in helping make this change to Dojo!

Note: See TracTickets for help on using tickets.