Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

237
Views
Select2 no establece automáticamente el valor seleccionado en CentOS 7

Tengo un select2 para mostrar la lista de zonas horarias y establecer automáticamente el valor seleccionado, los códigos a continuación funcionan correctamente en el entorno de desarrollo (ASP MVC Net Core 3.1), Visual Studio 2019, pero no establece automáticamente el valor seleccionado cuando se ejecuta en CentOS 7, extraño para mí, alguien me puede dar un consejo?

 $.ajax({ headers: { api_key: '@PTX.Models.AppSettingsModel.Application.API_Key', api_secret: '@PTX.Models.AppSettingsModel.Application.API_Secret' }, type: 'GET', url: getDeploymentPath() + '/User/Timezone/', dataType: 'json' }).done(function (data) { result = $.map(data, function (x) { return { id: x.id, text: x.text }; }); $("#timezone").select2({ data: result, placeholder: "Select timezone", escapeMarkup: function (markup) { return markup; } }); $('#timezone').val(_timezone_id); $('#timezone').select2().trigger('change'); // Have tried below, but no luck :( //$("#timezone").select2('data', { id: _timezone_id, text: _timezone_text }); //$('#timezone').val(_timezone_id).trigger('change'); });
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!