Sunday, July 5, 2020

KnockoutJS - split a string

So you need to convert it first to a string then you can do the split.

self.ShortDate = ko.computed(function () {
    return self.opts.value().toString().split(" ",4);
}, self);

No comments:

Post a Comment

Lab 09: Publish and subscribe to Event Grid events

  Microsoft Azure user interface Given the dynamic nature of Microsoft cloud tools, you might experience Azure UI changes that occur after t...