• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Liquid syntax to format date picker output in WebApp

New Here ,
Jul 31, 2017 Jul 31, 2017

Copy link to clipboard

Copied

Hi there,

I have a web app that uses the date picker to set a date. In the listing for this app, I need to be able to format the date of this date picker calue. I have seen references in the documentation to formatting date st by the system, but not a date set by the date picker.

I have used:

<td>{{item.['authorised date'] | date: "%y-%M-%d"}}</td>

Where ['authorised date'] is a user input by the date picker.

Could I get some help in pointing out what I am missing?

Many thanks,

Jude.

TOPICS
Web apps

Views

676

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 02, 2017 Aug 02, 2017

That is the format you have said for it to output.

all the date options are here:
Filters | Business Catalyst Support

All the %y etc is the bit you need to edit.

Votes

Translate

Translate
LEGEND ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

Hi Jude,

Date fields require to be in the format they are in to work with BC.

So You will only be able to render the output differently.

I can not see anything wrong with what you posted here in that regard.

{{dateVariable | date: "%y-%M-%d"}}

Is another example. What is outputting?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 01, 2017 Aug 01, 2017

Copy link to clipboard

Copied

Thanks for getting back to me Liam.

I have in my template:

<td>{{item.['authorised date'] | date: "%y-%M-%d" }}</td>

It is outputting:

<td>31-Jul-2017</td>

I am not sure what other details I can give you?

Many thanks,

Jude.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 02, 2017 Aug 02, 2017

Copy link to clipboard

Copied

That is the format you have said for it to output.

all the date options are here:
Filters | Business Catalyst Support

All the %y etc is the bit you need to edit.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 03, 2017 Aug 03, 2017

Copy link to clipboard

Copied

LATEST

Got it, thanks for your help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines