Uploaded image for project: 'PUBLIC - Liferay Alloy UI'
  1. PUBLIC - Liferay Alloy UI
  2. AUI-1089

aui-datepicker outputs an extra space when mask includes %e and date below 10 is selected.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.x
    • Fix Version/s: None
    • Component/s: DatePicker
    • Labels:
      None

      Description

      When the mask of an aui-datepicker, which is triggered by an input text box, contains "%e" and values below 10 are selected, an extra space is included before the date. For example, if the mask "%m/%e/%y" is used and the 9th of October in 2013 is selected from the date picker, the date output in the textbox will appear as "8/ 9/13" rather than "8/9/13".
      Steps to reproduce:
      1. Paste this code into an .html file:

      <html>
      	<head>
      		<script src="http://cdn.alloyui.com/2.0.0/aui/aui-min.js"></script>
      		<link href="http://cdn.alloyui.com/2.0.0/aui-css/css/bootstrap.min.css" rel="stylesheet"></link>
      	</head>
      	<body>
      		<input id="datePicker" type="text">
      		<script type="text/javascript">
      			YUI().use(
      				'aui-datepicker',
      				function(Y) {
      					var datePicker = new Y.DatePicker({
      						trigger : '#datePicker',
      						mask : '%e',
      						on : {
      							selectionChange : function(event) {
      								console.log(event.newSelection)
      							}
      						}
      					});
      				}
      			);
      		</script>
      	</body>
      </html>
      

      2. Load your .html file in a browser.
      3. Click the input text box.
      4. Select a date with a day number that is less than 10 in the popup aui-datepicker.
      If the bug still exists, a space will appear before the date.

        Attachments

          Activity

            People

            Assignee:
            ui_alloy UI Alloy
            Reporter:
            kyle.stiemann Kyle Stiemann (Inactive)
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              7 years, 21 weeks, 5 days ago

                Packages

                Version Package