Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8472269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T17:01:04+00:00 2026-06-10T17:01:04+00:00

Is it possible to extend existing standard filters ( date , number , lowercase

  • 0

Is it possible to extend existing “standard” filters (date, number, lowercase etc)?
In my case I need to parse date from YYYYMMDDhhmmss format so I’d like to extend (or override) date filter instead of writing my own.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T17:01:05+00:00Added an answer on June 10, 2026 at 5:01 pm

    I’m not sure if I understand your question correctly, but if you would like to extend functionality of existing filters you could create a new filter that decorates an existing one. Example:

    myApp.filter('customDate', function($filter) {
        var standardDateFilterFn = $filter('date');
        return function(dateToFormat) {
         return 'prefix ' + standardDateFilterFn(dateToFormat, 'yyyyMMddhhmmss');
        };
    });
    

    and then, in your template:

    {{now | customDate}}
    

    Having said the above, if you simply want to format a date according to a given format this can be done with the existing date filter:

    {{now | date:'yyyyMMddhhmmss'}}
    

    Here is the working jsFiddle illustrating both techniques: http://jsfiddle.net/pkozlowski_opensource/zVdJd/2/

    Please note that if a format is not specified AngularJS will assume that this is ‘medium’ format (the exact format depends on a locale). Check http://docs.angularjs.org/api/ng.filter:date for more.

    The last remark: I’m a bit confused about the ‘parse from’ part of your question. The thing is that filters are used to parse an object (date in this case) to string and not vice verse. If you are after parsing strings (from an input) representing dates you would have to look into NgModelController#$parsers (check the “Custom Validation” part in http://docs.angularjs.org/guide/forms).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to extend jQuery 1.3 to include the parseJSON function from 1.4.1+,
Is it possible to continue or extend an existing schema with MySQL Workbench? This
Is it possible to extend an existing activity changing only its layout (eg. colors)?
Would be possible to extend this kind of layout so that I can have
Is it possible to extend a base template with another template in Smarty? I
Is it possible to extend user's session expiration time in CI. What I want
Is it possible to extend multiple classes in Scala. For example if I have
Is it possible to extend the rich-text editor to add and other HTML5 elements?
Is it possible to extend dynamically javascript function scope? I tried without success the
Clojure structs can be arbitrarily extended, adding new fields. Is it possible to extend

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.