Date/Time Field - how do Iimit time minute options?

Posted by tsarch on 14-Oct-2013 16:46

For a date/time field, I don't want every minute to show up in the drop down list. How can I limit the options to :15-minute increments?

This is a screenshot of what I'm trying to adjust:

Posted by Santosh Patel on 01-Nov-2013 02:11

You could put in custom javascript code to do that. Put up the following function in the onLoad event for that page (change the value 15 to reflect the intervals that you want):

$('.icon-calendar').parent().bind('click', function () {
  $('#minSelect option').each(function () {
      var number = parseInt($(this)[0].text, 10);
      if (number % 15 != 0) $(this).remove();
  });
});

For example, if this is a Create New Object page, you could reach the onLoad event area by navigating Object definition -> Pages -> Action New -> Properties

All Replies

Posted by Laurent on 18-Oct-2013 08:33

I'm afraid there is no way of changing that today. I suggest you post an Idea on community.progress.com/.../default.aspx if want such a feature to happen.

Posted by Santosh Patel on 01-Nov-2013 02:11

You could put in custom javascript code to do that. Put up the following function in the onLoad event for that page (change the value 15 to reflect the intervals that you want):

$('.icon-calendar').parent().bind('click', function () {
  $('#minSelect option').each(function () {
      var number = parseInt($(this)[0].text, 10);
      if (number % 15 != 0) $(this).remove();
  });
});

For example, if this is a Create New Object page, you could reach the onLoad event area by navigating Object definition -> Pages -> Action New -> Properties

This thread is closed