Slashes are already supported in PrimeNG calendar.
If you are experiencing issues with slashes not displaying correctly, it might be due to the calendar date format settings. Make sure to explicitly set the desired format as shown below:
<p-calendar
[monthNavigator]="true"
[yearNavigator]="true"
yearRange="1950:2021"
ngModel
[required]="true"
[maxDate]='today'
[showOnFocus]="false"
id="date1"
[showIcon]="true"
name="date1"
inputId="date1"
placeholder="Date Of Birth"
dateFormat="dd/mm/yy">
</p-calendar>
-- Edit --
If you are looking for a date mask feature in PrimeNG calendar, please note that it is currently not supported. A request has been submitted regarding this issue in February 2020, you can track its progress here.
In the meantime, you can utilize other date mask libraries like racoon-mask. For example:
npm install --save racoon-mask
app.module.ts
import {PrimeNgCalendarMaskModule} from 'racoon-mask'
...
...
imports: [ ..., CalendarModule, PrimeNgCalendarMaskModule ]
app.component.html
<p-calendar
[monthNavigator]="true"
[yearNavigator]="true"
yearRange="1950:2021"
ngModel
[required]="true"
[maxDate]='today'
[showOnFocus]="false"
id="date1"
name="date1"
inputId="date1"
placeholder="Date Of Birth"
dateFormat="dd/mm/yy"
rPCalendarMask>
</p-calendar>
<p>