This repository has been archived by the owner. It is now read-only.

with correct form input input prepend / append is on wrong div #111

Merged
merged 1 commit into from May 2, 2013

Conversation

Projects
None yet
2 participants
@fivethreeo
Contributor

fivethreeo commented Apr 12, 2013

class should not be on control-group

e.g.

<script type="text/javascript">
    $(document).ready(function() {
        $('#div_id_til').datetimepicker({
            format: 'yyyy-MM-dd hh:mm',
            language: 'nb-NO'
        });
    });
</script>

This breaks the layout:

<div id="div_id_til" class="control-group input-append">
    <label for="id_til" class="control-label required-field">Til</label>
    <div class="controls">
            <input name="til" type="text" id="id_til" value="2013-04-10 23:59" />
            <span class="add-on">
                <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
            </span>
            <p class="help-block">Når arrangementet slutter</p>
    </div>
</div>

This breaks the js:

<div id="div_id_til" class="control-group">
    <label for="id_til" class="control-label required-field">Til</label>
    <div class="controls">
        <div class="input-append">
            <input name="til" type="text" id="id_til" value="2013-04-10 23:59" />
            <span class="add-on">
                <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
            </span>
            <p class="help-block">Når arrangementet slutter</p>
        </div>
    </div>
</div>

This pull fixes the problem with the js

make the picker work with correct form markup
class should not be on control-group

@tarruda tarruda merged commit 3610b3a into tarruda:master May 2, 2013

@tarruda

This comment has been minimized.

Show comment Hide comment
@tarruda

tarruda May 2, 2013

Owner

thanks

Owner

tarruda commented May 2, 2013

thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.