Closed simon-void closed 6 years ago
Your lib/date.dart file triggers a warning from my linter for @JS('Date')
_The @JS() annotation can only be used if it is also declared on the library directive. (missing_js_libannotation)
Currently date.dart doesn't even have a library directive! Maybe that's an issue? Update: adding an annotated library directive here doesn't seem to change anything. But maybe it's still worth investigating?
i forked my own version of pikaday-dart and commit a workaround adding three helper methods that allow me to (mostly) circumvent the inability to handle DateTime objects by adding three new helper methods:
You can checkout my branch here. Not sure how to apply my commit to your branch (or remerging my fork). Never done this before, but there should be a way. Given you like my changes.
@simon-void went ahead and made PR from your branch to master
thanks for the contribution! (and sorry for the slow response)
1) i added to arguments (setDefaultDate and defaultDate) to the default configuration of your example Pikaday-usage
As expected this shows the datepicker with an initially selected date of 1.1.2015. At least it does its dart-version in Dartium. When compiled to js, the datepicker stays empty until a new value is selected manually (tested in Firefox and Chromium).
2) another problem when compiling to js, seems to be the paths to the pikaday resources. You link them as
but this interpretes the paths as absolute which is not what you want. Adding a '.' in the beginning seems to do the trick though: