Date Time is not displaying not properly in angularjs bootstrap

123 views
Skip to first unread message

giridhar mungi

unread,
May 18, 2014, 1:33:13 PM5/18/14
to ang...@googlegroups.com
<div data-datetime data-date-format="yyyy-mm-dd hh:mm:ss" data-link-field="dtp_input1">
<input data-ng-model="ContactTime" name="contactTime" id="contactTime" class="form-control" size="16" type="text">                                                      </div>

    myApp.directive("datetime", function ($rootScope) {
        return {
            restrict: 'A',
            link: function(scope, element, attrs) {
                element.click(function(){
                    element.datetimepicker({
                        dateFormat:'yyyy-mm-dd HH:mm:ss',
                        autoclose: 1,
                        todayHighlight: true,
                        showMeridian:1
                    });
                });
            }
        };
    });





Hi friends,Here is my div which displays date with the time with the help of angular directive.But Here the minute and seconds are not displaying properly.Did i do anything wrong in the datetime directive.

For example when i select the time 17-May-2014 2:35.It displaying as 17-May-2014 2:05. Minutes are always displaying 05.seconds also displaying wrongly.

I think the format is wrong.please help me.

Garry Taylor

unread,
May 19, 2014, 4:07:14 AM5/19/14
to ang...@googlegroups.com
Where is the datetimepicker coming from? Is this a JQuery plugin or a Angular UI component, It's possible that this UI does not follow the same formatting rules. 

Filipe Monteiro

unread,
May 19, 2014, 8:24:04 AM5/19/14
to ang...@googlegroups.com
I think you should use a jquery selector.
Reply all
Reply to author
Forward
0 new messages