سؤال

I have a requirement where I need to do client side sorting on a column that has two dates separated by 'hyphen'. I need to be sorting on the first date of the two dates. So basically my 'Effective Dates' column in the grid would have:

beginDate - endDate

The Effective Dates column need to be sorted on the beginDate.

I know this is possible if there is only one date in the column by specifying sorttype:date in the colModel for Effective Date. But in my case I have two dates in the column separated by a -.

Wondering if anyone has come across this?

Thanks

هل كانت مفيدة؟

المحلول

Not sure if this is the best way- But I ended up having two columns(Begin Date column and End Date Column) with hidden borders and disabled sorting on the End Date column. Made some adjustments on the styles so that they look like one column.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top