Hi,

On 02/27/2013 10:34 AM, nic...@nicoladefilippo.it wrote:
thus i changed it in (added ","):

Button {
              id: button
              text: "choose a date"

              onClicked:
pageStack.openDialog("Sailfish.Silica.DatePickerDialog", {
                  year: 2012,
                  month: 11,
                  day: 23,
                  /*onAccepted: {
                      button.text = "You chose: " + dateText
                  }*/
              })
          }

but commenting onAccepted obviously is impossible to show selected date.

Where is the error?

 Thanks for reporting this. The docs are obviously having a bug.

 This should work:
       Button {
                id: button
                text: "choose a date"

                onClicked: {
var dialog = pageStack.openDialog("Sailfish.Silica.DatePickerDialog", {
                                                          year: 2012,
                                                          month: 11,
                                                          day: 23
                                                      });

                    dialog.accepted.connect(function() {
                        button.text = "you chose: " + dialog.dateText
                    })
                }
            }

BR,
 Vesku



_______________________________________________
SailfishOS.org Devel mailing list

Reply via email to