angular - Setting Start / End Time in Primeng Schedule -
i adopt primeng schedule component https://www.primefaces.org/primeng/#/schedule , looking example of 'rich' event details editor dialog. primeng 'event details' popup sample displays date 'yyyy-mm-dd' event , need able set / edit event start , end time well.
in spirit of 'dry' believe must have been done others before me! can point me example can see working model?
i see there older sample based on underlying fullcalender jquery component upgraded angular here: https://www.alinous.org/web-developer/design-pattern/fullcalendar/ . failing else guess start that.
ok - can answer own question.
the embedded p-calendar component in p-dialog html sample code can updated accommodate adding showtime attribute , setting value "true".
the source sample html https://github.com/primefaces/primeng/blob/master/src/app/showcase/components/schedule/scheduledemo.html can modified show time picker:
to started change this:
<div class="ui-grid-row"> <div class="ui-grid-col-4"><label for="start">start</label></div> <div class="ui-grid-col-8"><p-calendar [(ngmodel)]="event.start" dateformat="yy-mm-dd" datatype="string"></p-calendar></div> </div>
to this:
<div class="ui-grid-row"> <div class="ui-grid-col-4"><label for="start">start</label></div> <div class="ui-grid-col-8"><p-calendar [(ngmodel)]="event.start" dateformat="yy-mm-dd" showtime="true" datatype="string"></p-calendar></div> </div>
Comments
Post a Comment