Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Jacek Wysocki
    @exu
    Hi, Is there any way to force 24h format in timepicker?
    Here is my code snippet
                                    <div>
                                        <div class="dropdown form-group col-md-6 col-sm-6 col-xs-6 col-lg-6">
                                            <label>Start Date</label>
                                            <a class="dropdown-toggle" id="dropdownStart" role="button" data-toggle="dropdown" data-target="#"
                                               href="#">
                                                <div class="input-group date">
                                                    <input data-ng-model="from" type="text" class="form-control">
                                                    <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                                </div>
                                            </a>
                                            <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                                <datetimepicker data-ng-model="from"
                                                                data-datetimepicker-config="{ dropdownSelector: '#dropdownStart', renderOn: 'end-date-changed', modelType: 'YYYY-MM-DD HH:mm:ss'}"
                                                                data-on-set-time="startDateOnSetTime()"
                                                                data-before-render="startDateBeforeRender($dates)"></datetimepicker>
                                            </ul>
                                        </div>
    
                                        <div class="dropdown form-group col-md-6 col-sm-6 col-xs-6 col-lg-6">
                                            <label>End Date</label>
                                            <a class="dropdown-toggle" id="dropdownEnd" role="button" data-toggle="dropdown" data-target="#"
                                               href="#">
                                                <div class="input-group date">
                                                    <input data-ng-model="to" class="form-control">
                                                    <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
                                                </div>
                                            </a>
                                            <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                                                <datetimepicker data-ng-model="to"
                                                                data-datetimepicker-config="{ dropdownSelector: '#dropdownEnd', renderOn: 'start-date-changed', modelType: 'YYYY-MM-DD HH:mm:ss' }"
                                                                data-on-set-time="endDateOnSetTime()"
                                                                data-before-render="endDateBeforeRender($view, $dates, $leftDate, $upDate, $rightDate)"></datetimepicker>
                                            </ul>
                                        </div>
                                    </div>
    Dale Lotts
    @dalelotts
    You want 24h format or Input, display, or both?
    Jacek Wysocki
    @exu
    both
    Dale Lotts
    @dalelotts
    Your snippet isn't using the angular-date-time-input - I'm confused.
    Use this directive for formatting the display in the input box - https://github.com/dalelotts/angular-date-time-input
    Jacek Wysocki
    @exu
    ok thanks a lot
    jamalwsilva
    @jamalwsilva
    Hi. I am trying to use a different timezone provided from browser. Already defined momentjs default timezone with moment.tz.setDefault() but still can't make it work properly.
    Dale Lotts
    @dalelotts
    Hey @jamalwsilva can you please post a fiddle, jsbin or other live example so can check it out?
    jamalwsilva
    @jamalwsilva
    jamalwsilva
    @jamalwsilva
    Something wrong with the sample?
    Dale Lotts
    @dalelotts
    Sorry, lost track of this question. Did you figure it out? I think you need to add moment().tz("Mexico/BajaSur") to your code to get it to work.
    @jamalwsilva See ^
    hbs2
    @hbs2
    is there someone ?
    Dale Lotts
    @dalelotts
    Someone for what?