display text in a field less right 8 characters

edited September 1, 2016 in Questions
How do I present text in a date/ time field displaying only the date, or - right 8 characters?



  • Rob HatchRob Hatch 🛠️ 
    edited September 1, 2016
    Skuid uses the JQuery date control  (see http://api.jqueryui.com/datepicker/)  and you can create a custom date formatting.  Here is an example inline snippet: 
    var $ = skuid.$; var field = arguments[0]; var value = arguments[1]; var jsdate = new Date();  //use skuid util to change SF date to JS date jsdate = skuid.time.parseSFDate(value);  //uses jQuery UI Datepicker.formatDate tools skuid.ui.fieldRenderers.TEXT[field.mode](field, $.datepicker.formatDate( "mm/dd/yy", jsdate));
    The key text is in the last line.   $.datepicker.formatDate(  XXX , jsdate  )      Use the Datepicker documentation linked above to find other options for formatting dates. 

    You can do similar things with strings,  manipulating them so only certain sections of the string show. 

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!