H
H
habrazhitel2014-12-04 18:14:56
JavaScript
habrazhitel, 2014-12-04 18:14:56

Datepicker Angular ui?

plnkr.co/edit/6mJYS87od8wen4jkEaf0?p=preview
by default, the input displays the date in the format 04-12-2014, I save the exact same code on the PC, run it, and it displays the date there Thu Dec 04 2014 18:05:15 GMT+0300 (Russia (winter))
How can this be? If you select from the calendar, then the date in the desired format is substituted. I tried to prescribe value to the input, it still overlaps, it seems that I didn’t find any settings either.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim, 2014-12-04
@habrazhitel

Can you delete this part of the code?

$scope.today = function() {
    $scope.dt = new Date();
  };
  $scope.today();

And there will be no inscription in the input) And add placeholder to the input itself.

N
Nikita Gushchin, 2014-12-04
@iNikNik

Maybe there are some errors in the console? Another version of the libraries?
And you have the attribute value="today" at the input - if there is ng-model, then this is not needed. You simply set the value of the input to the string "today".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question