ember-cli-bootstrap-datepicker
ember-cli-bootstrap-datepicker copied to clipboard
Support for component mode?
Hey, looks solid stuff. Good job. However what I'm missing is a way to set the picker to component mode. Is that possible? http://bootstrap-datepicker.readthedocs.org/en/release/markup.html#component
What i'd like to have is a calendar icon and possibly some other added markup and classes. Can this be achieved with this component?
Sample datepicker markup I'd love to make this component produce:
<div class="form-group">
<label for="dueDate" class="col-sm-4 control-label">
Alkaen
</label>
<div class="col-sm-8 datetimepicker input-group date">
<input id="dueDate" class="ember-view ember-text-field form-control" placeholder="Click to play" type="text">
<span class="input-group-addon">
<span class="glyphicon-calendar glyphicon"></span>
</span>
</div>
</div>
I mean I can see there's nothing stopping me from doing this (which is why ended up doing it):
<div class="form-group">
<label for="startDate" class="col-sm-4 control-label">
{{t 'archives.starting'}}
</label>
<div class="col-sm-8 datetimepicker input-group date">
{{bootstrap-datepicker
value=startDate
autoclose=true
calendarWeeks=true
clearBtn=true
language='fi'
id=dueDate
class='form-control'}}
<span class="input-group-addon">
<span class="glyphicon-calendar glyphicon"></span>
</span>
</div>
But then the calendar glyph is nonfunctioning and afaik bare bs datepicker makes clicking the glyph also open the calendar. If I want this behaviour, I need to come up with my own glue JS to make it happen? I found a way to make this happen by wrapping this all on a component of my own and making clicks on the glyph move focus on the input field, so not an urgent thing, but have you thought about building support for this into the component its self?
Hey @timolehto! Thanks for the idea. At the moment date-range and component modes are not supported, but you are right it would be awesome to cover all available modes of bootstrap-datepicker.
Actually I did the same trick you did to "simulate" component mode :smile: So I would implement support for date-range and component modes soon.
Can we expect this feature in the near future? It would be awesome.
Yep, support for all available features of bootstrap-datepicker is on my list.
Hello @soulim, thanks for the awesome add-on. :) Just wanted to know if there is an update on this issue.