question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Post date created - TagHelper

See original GitHub issue

We need a TagHelper that makes it easier to insert the created date of a post in the format selected. The TagHelper would be exclusively for the _PostPartial.cshtml and would be in the following format: <postcreated post=@Model>MMMM dd, yyyy</postcreated>

Which would produce the following output (based on MMMM dd, yyyy): June 18, 2017

TagHelpers should be created in the DasBlog.Web.UI project under the TagHelpers folder, I have a blog post on authoring TagHelpers here. Find out about why we use TagHelpers here, and specific steps on authoring TagHelpers can be found here.

Please note that these tasks are for code newbies who are looking to make contributions to supportive open source project using ASP.NET Core MVC. Please feel free to reach out to me on twitter and I will be happy to help walk you through this.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
poppastringcommented, Jan 25, 2018

@lalitkale For now lets go with the UI project will try to create a baseline of helpers. I can see us needing to create a framework to allow 3rd parties to produce variations or brand new TagHelpers and that framework would probably exist elsewhere.

0reactions
poppastringcommented, Feb 5, 2018

I am going to close this issue, and create separate issues for missing test cases.

Many thanks for your contribution!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Localised formatting for an input tag helper (Date)
I would like a way to display my ViewModel property (date) with the format yyyy-MM-dd - using taghelpers.
Read more >
Dates And Times in a Razor Pages Form
When working with dates and times in a Razor Pages form, you need to render a suitable control based in the task requirement....
Read more >
Tag Helpers in ASP.NET Core
Learn what Tag Helpers are and how to use them in ASP.NET Core.
Read more >
The Input Tag Helper renders DateOnly properties with an ...
In ASP.NET, an Input Tag Helper for a DateTime property (with a DataType.Date attribute) renders the date value correctly. But a DateOnly ...
Read more >
Understanding ASP.NET Core Tag Helpers
Step 1. First, we need to decide, which tag we need to target for creating the custom tag helpers and then we need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found