Skip to content

Commit f1812ca

Browse files
committed
docs(readme): Add information on overriding the template.
1 parent 286e6b1 commit f1812ca

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,14 @@ Native AngularJS datetime picker directive styled by Twitter Bootstrap 3
2323
## Support the project
2424
I know this is a tiny directive but many people use it in production (high 5 to all of us) - if you happen to use this directive please click the star button (at the top of the page) - it means a lot to all the contributors.
2525

26-
## Upgrading from 0.4.0 or earlier
27-
28-
The template used by this directive has been separated from the directive to allow the developer to override
29-
the template (i.e. use font-awesome styles in the template rather than glyphicons). As a result, you now
30-
need to include another javascript file in the page
31-
32-
```html
33-
<script type="text/javascript" src="node_modules/angular-bootstrap-datetimepicker/src/js/datetimepicker.templates.js"></script>
34-
```
26+
## Overriding html template
3527

3628
If you want to override the template used by this directive, simply populate the ```$templateCache``` with your own template.
3729

30+
```JavaScript
31+
$templateCache.put('templates/datetimepicker.html', '<div>...your custom template here...</div>')
32+
```
33+
3834
# Formatting the date in an input box
3935

4036
Use the [angular-date-time-input](https://github.com/dalelotts/angular-date-time-input) directive to format the

0 commit comments

Comments
 (0)