We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have Date Format like "01-03-2018". but the angular2-datable is not sorting correctly. the date is sorting based on the first digit.
The text was updated successfully, but these errors were encountered:
To sort by date you need to add parsing information in the template syntax that matches your date syntax. Table specifies "deliveryDate":
<table class="table table-condensed table-striped text-center" [(mfSortBy)]="deliveryDate" [(mfSortOrder)]="sortOrder" [mfData]="data" #mf="mfDataTable">
Header specifies with the "by" directive:
<thead><tr><th class="text-center"><mfDefaultSorter by="deliveryDate"><span>Order Date</span</mfDefaultSorter></th>
And in the tbody the crucial template parsing information:
<tbody><tr *ngFor="let item of mf.data"><td ><span>{{item.deliveryDate | date: 'MM-dd-yyyy'}}</span></td></tr></tbody>
Sorry, something went wrong.
No branches or pull requests
I have Date Format like "01-03-2018". but the angular2-datable is not sorting correctly. the date is sorting based on the first digit.
The text was updated successfully, but these errors were encountered: