angular


ng-bootstrap Datepicker current date like placeholder


I use ng-bootstrap Datepicker something like here: plnkr example
<div class="input-group">
<input class="form-control" placeholder="yyyy-mm-dd"
name="dp" [(ngModel)]="model" ngbDatepicker #d="ngbDatepicker">
<div class="input-group-addon" (click)="d.toggle()" >
<img src="img/calendar-icon.svg" style="width: 1.2rem; height: 1rem; cursor: pointer;"/>
</div>
</div>
and I would like have placeholder as current date instead yyyy-mm-dd.
For example today 23.10.2016.
It is possible or how can i do that.
You can do like this-
In component, defined date like this-
valuedate = new Date();
In template html, change placeholder like this-
placeholder="{{valuedate | date: 'yyyy-MM-dd'}}"
Result:

Related Links

How to get asynchronous data from one Angular component to another
Looping using ngFor and skip nth element
How to populate a dropdown list default value from API in Angular2 Model based form
Async pipe where no element
How to trigger PrimeNG Accordion Click programmatically in Angular 2.0?
how to use file system (fs) in angular 2
Angular2 router with Http data service through a Resolve with Observable catching 404
Angular: Get value as Input from Component in router outlet
display errors of the type net::ERR_CONNECTION_REFUSED
Pre Populate input filed in `FormGroup` - Angular2
Import JavaScript object from external file in Angular2 Component
Angular How to Format Reactive FormControls Values after Invoking Patch Value on ngOnInit
Add polyfill code in Angular 2
Bootstrap different app modules in Angular with angular-cli
resource interrupted as script but transfered with MIME type text/plain;
Erron while running angular-cli project in windows when created form ubuntu

Categories

HOME
cordova
gnuplot
drools
houndify
boost
graph-algorithm
apache-apex
purescript
crc32
apostrophe-cms
widget
corba
alexa-voice-service
angularjs-ng-route
executable-jar
emu8086
denial-of-service
ietf-netmod-yang
divide-and-conquer
twitter-streaming-api
gun
pki
fork
xbuild
silex
rubinius
ebcdic
autoload
fxml
neo4jclient
pdb-files
side-effects
choropleth
live
uppercase
lsmeans
nn
google-nearby
webex
fancytree
protactor
gulp-usemin
binary-image
rt
silent-installer
mypy
wso2-appm
strconv
release-management
nuodb
leap-motion
cpio
rpath
turtle-rdf
pdfobject
webtorrent
compass
google-plus-domains
xlconnect
qtquick2
idfa
nibble
reducers
oql
oslo
graphic-effects
sos
httpful
eclipse-emf-ecore
payara
opcode
adobe-flash-cs3
stompjs
sqlsrv
kermit
google-client
html5-validation
ontouchevent
rgs
ember-testing
desktop-shortcut
pegjs
lcm
apache-commons-exec
httpwatch
telerik-test-studio
microsoft-commerce-server
stubs
where-in
scite
mic-1
ios6.1
batoo
payflowlink
jpreloader
trusted-timestamp
django-sessions
grit
custom-view
getprocaddress
git-add
generic-list
bionic
visualtreehelper
glow
alasset
dynamic-css
loose-coupling
incremental-linking

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App