Skip to content

Commit

Permalink
fix(300): use bootstrap date picker
Browse files Browse the repository at this point in the history
HTML5 date type is only supported by Chrome.

Use angular-xeditable + ui-bootstrap ngClick workaround[1], plus a fork that
makes the input button optional[2] as we have space constraints.

Closes eHealthAfrica#300.

[1]: vitalets/angular-xeditable#164 (comment)
[2]: vitalets/angular-xeditable#388
  • Loading branch information
tlvince committed Nov 10, 2015
1 parent 3bc0fae commit 2ea4cdc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"angular-dragdrop": "~1.0.12",
"ng-csv": "~0.3.4",
"angular-csv-import": "~0.0.16",
"angular-xeditable": "~0.1.9",
"angular-xeditable": "https://github.com/tlvince/angular-xeditable.git#bd328b25ec309c437b9d1a96bedb0a019768e9a0",
"angular-eha.couchdb-auth": "~1.1.0",
"angular-ui-grid": "ui-grid#~3.0.7",
"ui-select": "angular-ui-select#~0.13.2",
Expand Down
16 changes: 12 additions & 4 deletions src/app/planning/schedule/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,17 @@ <h4><i class="fa fa-truck"></i> Schedules for Delivery Round: {{
<td ng-bind="::facRnd.facility.name"></td>
<td ng-bind="::facRnd.facility.id"></td>
<td>
<a href="#" editable-date="facRnd.date" e-name="deliveryDate" e-form="rowform">
{{ srCtrl.getDate(facRnd.date) }}
</a>
<span
ng-bind="srCtrl.getDate(facRnd.date)"
editable-bsdate="facRnd.date"
e-name="deliveryDate"
e-form="rowform"
e-init-date="false"
e-datepicker-popup
e-ng-click="opened = !opened"
e-is-open="opened"
buttons="no"
></span>
</td>
<td>
<span editable-select="facRnd.driverID"
Expand Down Expand Up @@ -140,4 +148,4 @@ <h4><i class="fa fa-truck"></i> Schedules for Delivery Round: {{
</table>
</div>
</div>
</div>
</div>

0 comments on commit 2ea4cdc

Please sign in to comment.