Closed tayeh closed 5 years ago
plus i need to reconvert the date to string :)
@Tayeh,
Assume Datepicker
object is picker
Then picker.getPickedDate()
will return Date
or HijriDate
object depend on Datepicker
dates mode.
To extract the date in format DD/MM/YYYY you can use following code snippet:
let date = picker.getPickedDate();
let formattedDate = HijriDate.toNDigit(date.getDate(), 2) + '/' + HijriDate.toNDigit(date.getMonth()+1, 2) + '/' + HijriDate.toNDigit(date.getFullYear(), 4);
hi can i get the date in format 16/03/2019 also i need it for hijri date ?