Skip to Content
0

creating a date range selection and displaying the output in the table when selecting a duration

Nov 13, 2017 at 06:26 AM

31

avatar image
Former Member

Hi Folks,

We have a requirement of selecting a date range. Suppose if we select from date as Apr,2016 and to date as march,2017, the data should be displayed in the table below with months in each column.

Table should be like

Apr 16 May 16 .................. Jan 17 Feb 17 Mar 17

Please provide me an example of building this code.

Regards,

Sindhu

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Mantri Shekar Nov 13, 2017 at 07:00 AM
0

Hi Sindhuja,

On Selecting Date Range What operation you are performing(I mean to say are you fetching any Data From Backend or filtering data in Client side).

If you are filtering Data from backend using any select query then you can get the Distinct Months for the selected Date Range and and Bind this date range values to sap.m.Table Header Column Values.

Other wise even if you are filtering Data with in client model using JSON.Even here also you perform the same to fetch distinct Month and year Values and bind it to sap.m.Table Header.

Show 3 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Shekar,

On selecting the Date Range, We need to fetch the data of the selected financial year using oData model in a tabular format (each month each column) as I mentioned in the question.

Please provide me any JS Bin code if possible for better understanding the resolution.

Regards,

Sindhu

0

Hi Sindhuja,

Below link would help to get Different months for the selected Date range.

Apply your values to the below code available in the link.

http://jsfiddle.net/DianaNassar/C97DJ/1/

0
Former Member

Hi Shekar,

I couldn't find date range selection the code.

My requirement is select a date range as

Financial Year : (fromdate) - (todate)

Display values in the table fetching the data from Odata. Table will be like below.

Apr May June July ................................................. jan Feb Mar

Regards,

Sindhu

0